From cb72266c81c1eb0590d9afb1d25e40ba3b00fcff Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Mon, 2 Mar 2020 11:40:16 +0000 Subject: [PATCH] Commit before pull --- .../src/Menu/Menu.svelte | 2 -- .../src/Test/TestApp.svelte | 2 ++ .../src/Test/props.js | 23 +++++++++++++++++++ .../materialdesign-components/src/index.js | 1 + 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/materialdesign-components/src/Menu/Menu.svelte b/packages/materialdesign-components/src/Menu/Menu.svelte index 4121f41340..b601d38f3e 100644 --- a/packages/materialdesign-components/src/Menu/Menu.svelte +++ b/packages/materialdesign-components/src/Menu/Menu.svelte @@ -45,8 +45,6 @@ } setContext("BBMD:list:context", "menu") }) - - $: menu && _bb.attachChildren(menu) {#if useFixedPosition || useAbsolutePosition} diff --git a/packages/materialdesign-components/src/Test/TestApp.svelte b/packages/materialdesign-components/src/Test/TestApp.svelte index b6c40fa895..63fec32977 100644 --- a/packages/materialdesign-components/src/Test/TestApp.svelte +++ b/packages/materialdesign-components/src/Test/TestApp.svelte @@ -16,6 +16,7 @@ CustomersIndexTable, List, Icon, + Menu, } = props let currentComponent @@ -40,6 +41,7 @@ Datatable, CustomersIndexTable, List, + Menu, ], }, } diff --git a/packages/materialdesign-components/src/Test/props.js b/packages/materialdesign-components/src/Test/props.js index c10cce0161..3503631a86 100644 --- a/packages/materialdesign-components/src/Test/props.js +++ b/packages/materialdesign-components/src/Test/props.js @@ -152,4 +152,27 @@ export const props = { singleSelection: true, onSelect: selected => console.log(selected), }, + Menu: { + _component: "@budibase/materialdesign-components/Menu", + _children: [ + { + _component: "@budibase/materialdesign-components/ListItem", + _children: [], + text: "Settings", + value: 0, + }, + { + _component: "@budibase/materialdesign-components/ListItem", + _children: [], + text: "Account", + value: 1, + }, + { + _component: "@budibase/materialdesign-components/ListItem", + _children: [], + text: "Profile", + value: 2, + }, + ], + } } diff --git a/packages/materialdesign-components/src/index.js b/packages/materialdesign-components/src/index.js index 5dac37d7b6..3517b2ed7e 100644 --- a/packages/materialdesign-components/src/index.js +++ b/packages/materialdesign-components/src/index.js @@ -17,3 +17,4 @@ export { export { default as indexDatatable } from "./Templates/indexDatatable" export { default as recordForm } from "./Templates/recordForm" export { List, ListItem } from "./List" +export {Menu} from "./Menu"