Skip to content

Instantly share code, notes, and snippets.

@emgk
Created August 16, 2018 16:35
Show Gist options
  • Save emgk/05513fb9c1e9bd6d6303428e9ed0f3b4 to your computer and use it in GitHub Desktop.
Save emgk/05513fb9c1e9bd6d6303428e9ed0f3b4 to your computer and use it in GitHub Desktop.
sample field json for "Guten block fields" npm package https://www.npmjs.com/package/guten-block-fields
{
"name": "My Controllers",
"output": "./blocks",
"toggles": {
"bio": {
"title": "Bio data",
"isOpen": true,
"icon": ""
},
"occuption": {
"title":"Occuption",
"isOpen":false
}
},
"fields": [
{
"title": "Your Name",
"slug": "your-name",
"type": "text",
"value": 123,
"toggle": "bio",
"attributeName": "name",
"baseControl": true
},
{
"title": "Accept t&c",
"label": "Sample",
"toggle": "bio",
"checked": true,
"type": "checkbox"
},
{
"title": "Save Changes",
"type": "button",
"toggle": "occuption",
"default": false,
"class": "save"
},
{
"title": "Button Group",
"type": "button-group",
"toggle": "occuption",
"buttons": [
{
"isPrimary": true,
"class": "red",
"label": "Red"
},
{
"isPrimary": false,
"class": "blue",
"label": "Blue"
}
]
},
{
"title": "Your father name",
"slug": "father-name",
"toggle": "occuption",
"type": "text",
"value": 123,
"attributeName": "name"
},
{
"title": "City name",
"toggle": "occuption",
"slug": "city-name",
"type": "text",
"value": 123,
"attributeName": "name"
},
{
"type": "select",
"value": "india",
"toggle": "occuption",
"title": "Country",
"options": [
{
"label": "India",
"value": "india"
},
{
"label": "USA",
"value": "usa"
}
]
},
{
"type": "radio",
"title": "Gender",
"value": "male",
"options": [
{
"label": "Male",
"value": "m"
},
{
"label": "Female",
"value": "f"
}
]
},
{
"type": "range",
"title": "Volume",
"min": 1,
"max": 100,
"value": 40
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment