1.0.4 • Published 2 years ago
json-to-html.js v1.0.4
Installation
npm install json-to-html.js --save
Basic usage:
import JsonToHtmlBuilder from 'json-to-html.js'
...
const jsonToHtml = new JsonToHtmlBuilder(Data, HTMLElement).build()
jsonToHtml.execute()
Concepts
{
"id": "61f99f57cfb6f9db49bfedde",
"email": "sexton_browning@aquafire.lidl",
"roles": ["owner", "guest"]
}
{ "id": "61f99f57cfb6f9db49bfedde", "email": "sexton_browning@aquafire.lidl", "roles" : "owner", "guest" }
Container
CSS classes:
- base: base-container
- when-array: array
- when-object: object
- Its construction can be overridden by withCreateContainerEl on building phase
Section
CSS classes:
- base: section-container
- when-array: array
- when-object: object
- Its construction can be overridden by withCreateSectionEl on building phase
CSS classes:
- base: section-header
- Its construction can be overridden by withCreateSectionHeaderEl on building phase
Field
CSS classes:
- base: field-container
- key element: key
- value element: value
- Its construction can be overridden by withCreateFieldEl on building phase
Value
CSS classes:
- base: value
- Its construction can be overridden by withCreateValueEl on building phase
Advanced usage:
coming soon...