Update dev/config.js with more useful examples

This commit is contained in:
Keegan
2016-03-03 10:27:38 +11:00
parent 7bf4117d87
commit 87d8b91153
+20 -38
View File
@@ -24,40 +24,32 @@ module.exports = [
"type": "input", "type": "input",
"appKey": "email", "appKey": "email",
"defaultValue": "", "defaultValue": "",
"label": "Email", "label": "Input Field",
"description": "This is a description for the input component. " +
"You can add <strong>html</strong> in here too.",
"attributes": { "attributes": {
"placeholder": "eg: name@domain.com", "placeholder": "Placeholder set with attributes"
"limit": 10, }
"required": "required",
type: "email"
},
"description": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
}, },
{ {
"type": "toggle", "type": "toggle",
"appKey": "cool_stuff", "appKey": "cool_stuff",
"label": "Enable Cool Stuff", "label": "This is a Toggle",
"defaultValue": false, "defaultValue": false
"description": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
}, },
{ {
"type": "color", "type": "color",
"appKey": "colorTest", "appKey": "colorTest",
"defaultValue": "FF0000", "defaultValue": "FF0000",
"label": "Background Color", "label": "Standard Color Picker",
"sunlight": false "sunlight": false
}, },
{ {
"type": "color", "type": "color",
"appKey": "sunnyColorTest", "appKey": "sunnyColorTest",
"defaultValue": "00FF00", "defaultValue": "00FF00",
"label": "Sunny Color", "label": "Sunny Color Picker",
"sunlight": true, "sunlight": true
"description": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
} }
] ]
}, },
@@ -71,48 +63,38 @@ module.exports = [
{ {
"type": "radiogroup", "type": "radiogroup",
"appKey": "radiogroup-test", "appKey": "radiogroup-test",
"label": "Radio test", "label": "Radio Group",
"options": [ "options": [
{ "label": "Test thing one", "value": "one" }, { "label": "Test thing", "value": "one" },
{ "label": "Another thing", "value": "two" }, { "label": "Another thing", "value": "two" },
{ "label": "One really long thing that would not fit", "value": "three" }, { "label": "Final thing with <em>html</em>", "value": "three" }
{ "label": "Small", "value": "quote' \"test" }, ]
{ "label": "Final thing", "value": "three" }
],
"description": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
}, },
{ {
"type": "checkboxgroup", "type": "checkboxgroup",
"appKey": "checkboxgroup-test", "appKey": "checkboxgroup-test",
"defaultValue": ["quote' \"test", "two"], "defaultValue": ["quote' \"test", "two"],
"label": "Checkbox test", "label": "Checkbox Group",
"options": [ "options": [
{ "label": "Test <strong>thing</strong> one", "value": "one" }, { "label": "First thing", "value": "three" },
{ "label": "Another thing", "value": "two" }, { "label": "Another thing", "value": "two" },
{ "label": "One really long thing that would not fit", "value": "three" },
{ "label": "Small", "value": "quote' \"test" },
{ "label": "Final thing", "value": "three" } { "label": "Final thing", "value": "three" }
], ]
"description": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
}, },
{ {
"type": "select", "type": "select",
"appKey": "flavor", "appKey": "flavor",
"defaultValue": "grape", "defaultValue": "grape",
"label": "Favorite Flavor", "label": "Select Menu",
"options": [ "options": [
{ "label": "", "value": "" }, { "label": "", "value": "" },
{ "label": "Berry", "value": "berry" }, { "label": "Berry", "value": "berry" },
{ "label": "Grape", "value": "grape" }, { "label": "This Option is Selected", "value": "grape" },
{ "label": "Banana", "value": "banana" } { "label": "Banana", "value": "banana" }
], ],
"attributes": { "attributes": {
"required": "required" "required": "required"
}, }
"description": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
} }
] ]
}, },