Merge pull request #119 from Conor-Mack/feature/component-json-options

Component JSON options update and related changes
This commit is contained in:
Conor_Mack 2020-02-21 15:02:19 +00:00 committed by GitHub
commit beb6ee55c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 11 deletions

View File

@ -28,9 +28,21 @@
"description": "A Material Design button with different variations. It renders as an anchor if href is passed to it.",
"props": {
"onClick": "event",
"variant": "string",
"colour": "string",
"size": "string",
"variant": {
"type": "options",
"options": ["text", "raised", "unelevated", "outlined"],
"default": "text"
},
"colour": {
"type": "options",
"options": ["primary", "secondary"],
"default": "primary"
},
"size": {
"type": "options",
"options": ["small", "medium", "large"],
"default": "medium"
},
"href": "string",
"icon": "string",
"trailingIcon": "bool",
@ -158,8 +170,7 @@
"props": {
"onClick": "event",
"id": "string",
"label": "string",
"names": "string",
"label": "string",
"name": "string",
"checked": "bool",
"disabled": "bool",
@ -189,12 +200,28 @@
"props": {
"onChange": "event",
"label": "string",
"variant": "string",
"variant": {
"type": "options",
"options": ["standard", "outlined", "filled"],
"default": "standard"
},
"disabled": "bool",
"fullwidth": "bool",
"colour":"string",
"size":"string",
"type": "string",
"colour": {
"type": "options",
"options": ["primary", "secondary"],
"default": "primary"
},
"size":{
"type": "options",
"options": ["small", "medium", "large"],
"default": "medium"
},
"type": {
"type": "options",
"options": ["text", "password"],
"default": "text"
},
"required": "bool",
"minLength": "number",
"maxLength": "number",

View File

@ -4,11 +4,11 @@
import ripple from "../Common/Ripple.js"
import ClassBuilder from "../ClassBuilder.js"
const cb = new ClassBuilder("button", ["primary", "medium"])
const cb = new ClassBuilder("button", ["primary", "medium", "text"])
export let onClick = () => {}
export let variant = "raised"
export let variant = "text"
export let colour = "primary"
export let size = "medium"