From 202b4f099660c5a43989a7ddddfcf57dae1f4705 Mon Sep 17 00:00:00 2001 From: Conor Mack Date: Mon, 23 Mar 2020 13:58:40 +0000 Subject: [PATCH] MD Dialog Complete and Margins for Typography --- .../materialdesign-components/package.json | 1 + .../src/Button/Button.svelte | 5 ++- .../src/Dialog/Dialog.svelte | 44 +++++++++++++++++++ .../src/Dialog/DialogActions.svelte | 13 ++++++ .../src/Dialog/DialogContent.svelte | 11 +++++ .../src/Dialog/DialogHeader.svelte | 5 +++ .../src/Dialog/_style.scss | 1 + .../src/Dialog/index.js | 5 +++ .../src/Test/TestApp.svelte | 4 +- .../src/Test/props.js | 42 ++++++++++++++++++ .../src/Typography/Body1.svelte | 8 +++- .../src/Typography/Caption.svelte | 8 +++- .../src/Typography/H1.svelte | 8 +++- .../src/Typography/H2.svelte | 8 +++- .../src/Typography/H3.svelte | 8 +++- .../src/Typography/H4.svelte | 8 +++- .../src/Typography/H5.svelte | 8 +++- .../src/Typography/Overline.svelte | 8 +++- .../src/Typography/Sub1.svelte | 8 +++- .../materialdesign-components/src/index.js | 2 +- 20 files changed, 191 insertions(+), 14 deletions(-) create mode 100644 packages/materialdesign-components/src/Dialog/Dialog.svelte create mode 100644 packages/materialdesign-components/src/Dialog/DialogActions.svelte create mode 100644 packages/materialdesign-components/src/Dialog/DialogContent.svelte create mode 100644 packages/materialdesign-components/src/Dialog/DialogHeader.svelte create mode 100644 packages/materialdesign-components/src/Dialog/_style.scss create mode 100644 packages/materialdesign-components/src/Dialog/index.js diff --git a/packages/materialdesign-components/package.json b/packages/materialdesign-components/package.json index 42bea7428c..9a6fc7c616 100644 --- a/packages/materialdesign-components/package.json +++ b/packages/materialdesign-components/package.json @@ -17,6 +17,7 @@ "@material/button": "^4.0.0", "@material/checkbox": "^4.0.0", "@material/data-table": "4.0.0", + "@material/dialog": "4.0.0", "@material/form-field": "^4.0.0", "@material/icon-button": "4.0.0", "@material/list": "4.0.0", diff --git a/packages/materialdesign-components/src/Button/Button.svelte b/packages/materialdesign-components/src/Button/Button.svelte index 80b3ddd792..a2948613ea 100644 --- a/packages/materialdesign-components/src/Button/Button.svelte +++ b/packages/materialdesign-components/src/Button/Button.svelte @@ -33,15 +33,16 @@ if (!href) modifiers = { variant } - let props = { modifiers, customs, extras } + $: props = { modifiers, customs, extras } - let blockClasses = cb.build({ props }) + $: blockClasses = cb.build({ props }) const labelClass = cb.elem("label") const clicked = () => _bb.call(onClick) $: renderLeadingIcon = !!icon && !trailingIcon $: renderTrailingIcon = !!icon && trailingIcon + $: console.log(blockClasses) {#if href} diff --git a/packages/materialdesign-components/src/Dialog/Dialog.svelte b/packages/materialdesign-components/src/Dialog/Dialog.svelte new file mode 100644 index 0000000000..c316c6a249 --- /dev/null +++ b/packages/materialdesign-components/src/Dialog/Dialog.svelte @@ -0,0 +1,44 @@ + + +
+
+
+
+
(open = false)} /> +
diff --git a/packages/materialdesign-components/src/Dialog/DialogActions.svelte b/packages/materialdesign-components/src/Dialog/DialogActions.svelte new file mode 100644 index 0000000000..1bb23cee44 --- /dev/null +++ b/packages/materialdesign-components/src/Dialog/DialogActions.svelte @@ -0,0 +1,13 @@ + + +