Adding new components to components json

This commit is contained in:
Conor_Mack 2020-03-06 10:14:21 +00:00
parent 2e5c0d26d6
commit 358c868ec5
2 changed files with 60 additions and 4 deletions

View File

@ -46,6 +46,19 @@
"persistent": "bool"
}
},
"List": {
"name": "List",
"description": "A Material Design List Component.",
"props": {
"onSelect": "event",
"singleSelection": "bool",
"variant": {
"type": "options",
"options": ["one-line", "two-line"],
"default": "one-line"
}
}
},
"ListItem": {
"name": "ListItem",
"description": "Use as item in a 'List' or 'Select' component",
@ -112,6 +125,22 @@
},
"tags": []
},
"Checkboxgroup": {
"name": "Checkboxgroup",
"description": "A group of material design checkboxes. Supports row and column orientation.",
"props": {
"onChange": "event",
"label":"string",
"orientation": {
"type": "options",
"options": ["row", "column"],
"default": "row"
},
"fullwidth": "bool",
"disabled": "bool",
"alignEnd": "bool"
}
},
"Datatable": {
"name": "Datatable",
"description": "A Material Design component to represent tabular data.",
@ -196,6 +225,18 @@
},
"tags": []
},
"Menu": {
"name": "Menu",
"description": "A Material Design menu component. Anchor to other components to create a pop-out menu.",
"props": {
"onSelect": "event",
"width": "string",
"open": "bool",
"useFixedPosition": "bool",
"absolutePositionX": "number",
"absolutePositionY": "number"
}
},
"Overline": {
"name": "Overline",
"description": "Sets the font properties as Roboto Overline",
@ -218,6 +259,22 @@
},
"tags": []
},
"Radiobuttongroup": {
"name": "Radiobuttongroup",
"description": "A Material Design Radiobutton group. Supports row and column orientation.",
"props": {
"onChange": "event",
"name": "string",
"orientation": {
"type": "options",
"options": ["row", "column"],
"default": "row"
},
"fullwidth": "bool",
"alignEnd": "bool",
"disabled": "bool"
}
},
"Sub1": {
"name": "Sub1",
"description": "Sets the font properties as Roboto Subtitle1",

View File

@ -10,8 +10,8 @@
export let open = true
export let useFixedPosition = false
export let useAbsolutePosition = false
//{x: number, y: number}
export let absolutePositionCoords = null
export let absolutePositionX = 0
export let absolutePositionY = 0
export let _bb
@ -33,8 +33,7 @@
if (useFixedPosition) {
instance.setFixedPosition(true)
} else if (useAbsolutePosition) {
let { x, y } = absolutePositionCoords
instance.setAbsolutePosition(x | 0, y | 0)
instance.setAbsolutePosition(absolutePositionX, absolutePositionY)
}
}
})