From ebd69600edade11e99b3c4004048338bbdc540bc Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Fri, 6 Mar 2020 10:14:21 +0000 Subject: [PATCH] Adding new components to components json --- .../materialdesign-components/components.json | 57 +++++++++++++++++++ .../src/Menu/Menu.svelte | 7 +-- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/packages/materialdesign-components/components.json b/packages/materialdesign-components/components.json index dbc39c4f62..0028b39545 100644 --- a/packages/materialdesign-components/components.json +++ b/packages/materialdesign-components/components.json @@ -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", diff --git a/packages/materialdesign-components/src/Menu/Menu.svelte b/packages/materialdesign-components/src/Menu/Menu.svelte index 5782652376..8439128208 100644 --- a/packages/materialdesign-components/src/Menu/Menu.svelte +++ b/packages/materialdesign-components/src/Menu/Menu.svelte @@ -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) } } })