From f59eedc21f186ea703d7321cbd63546f680de7cf Mon Sep 17 00:00:00 2001 From: Conor_Mack <36074859+Conor-Mack@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:47:47 +0000 Subject: [PATCH] MD Typography completed (#86) --- .../src/Test/TestApp.svelte | 6 ++---- .../materialdesign-components/src/Test/props.js | 13 +++++++++---- .../src/Test/testComponents.js | 5 ++--- .../src/Typography/Body1.svelte | 5 +++++ .../src/Typography/Body2.svelte | 5 +++++ .../src/Typography/Caption.svelte | 5 +++++ .../src/Typography/H1.svelte | 5 +++++ .../src/Typography/H2.svelte | 5 +++++ .../src/Typography/H3.svelte | 5 +++++ .../src/Typography/H4.svelte | 5 +++++ .../src/Typography/H5.svelte | 5 +++++ .../src/Typography/H6.svelte | 5 +++++ .../src/Typography/Overline.svelte | 5 +++++ .../src/Typography/Sub1.svelte | 5 +++++ .../src/Typography/Sub2.svelte | 5 +++++ .../src/Typography/_style.scss | 1 + .../src/Typography/index.js | 13 +++++++++++++ packages/materialdesign-components/src/index.js | 3 ++- 18 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 packages/materialdesign-components/src/Typography/Body1.svelte create mode 100644 packages/materialdesign-components/src/Typography/Body2.svelte create mode 100644 packages/materialdesign-components/src/Typography/Caption.svelte create mode 100644 packages/materialdesign-components/src/Typography/H1.svelte create mode 100644 packages/materialdesign-components/src/Typography/H2.svelte create mode 100644 packages/materialdesign-components/src/Typography/H3.svelte create mode 100644 packages/materialdesign-components/src/Typography/H4.svelte create mode 100644 packages/materialdesign-components/src/Typography/H5.svelte create mode 100644 packages/materialdesign-components/src/Typography/H6.svelte create mode 100644 packages/materialdesign-components/src/Typography/Overline.svelte create mode 100644 packages/materialdesign-components/src/Typography/Sub1.svelte create mode 100644 packages/materialdesign-components/src/Typography/Sub2.svelte create mode 100644 packages/materialdesign-components/src/Typography/_style.scss create mode 100644 packages/materialdesign-components/src/Typography/index.js diff --git a/packages/materialdesign-components/src/Test/TestApp.svelte b/packages/materialdesign-components/src/Test/TestApp.svelte index 63c59742cb..306ccb1169 100644 --- a/packages/materialdesign-components/src/Test/TestApp.svelte +++ b/packages/materialdesign-components/src/Test/TestApp.svelte @@ -7,15 +7,13 @@ const _appPromise = createApp() _appPromise.then(a => (_bb = a)) - const testProps = props.justAnH1 - const button = props.button - const textfield = props.textfield + const { h1, overline, button, textfield } = props let currentComponent $: { if (_bb && currentComponent) { - _bb.hydrateChildren([testProps, button, textfield], currentComponent) + _bb.hydrateChildren([h1, overline, button, textfield], currentComponent) } } diff --git a/packages/materialdesign-components/src/Test/props.js b/packages/materialdesign-components/src/Test/props.js index 70145635ec..d150945401 100644 --- a/packages/materialdesign-components/src/Test/props.js +++ b/packages/materialdesign-components/src/Test/props.js @@ -1,11 +1,16 @@ -const getComponent = comp => `@budibase//materialdesign-components/${comp}`; +const getComponent = comp => `@budibase/materialdesign-components/${comp}`; export const props = { - justAnH1: { - _component: "@budibase/materialdesign-components/h1", + h1: { + _component: "@budibase/materialdesign-components/H1", _children: [], - text: "This is a Header", + text: "Im a big header", + }, + overline: { + _component: getComponent`Overline`, + _children: [], + text: "A wee Overline", }, button: { _component: "@budibase/materialdesign-components/button", diff --git a/packages/materialdesign-components/src/Test/testComponents.js b/packages/materialdesign-components/src/Test/testComponents.js index ac39796264..bae276512f 100644 --- a/packages/materialdesign-components/src/Test/testComponents.js +++ b/packages/materialdesign-components/src/Test/testComponents.js @@ -1,4 +1,3 @@ -import h1 from "../H1.svelte"; -import { button, icon, textfield } from "@BBMD"; -export default { h1, button, icon, textfield }; +import { button, icon, textfield, H1, Overline } from "@BBMD"; +export default { H1, Overline, button, icon, textfield }; diff --git a/packages/materialdesign-components/src/Typography/Body1.svelte b/packages/materialdesign-components/src/Typography/Body1.svelte new file mode 100644 index 0000000000..9d71d17e62 --- /dev/null +++ b/packages/materialdesign-components/src/Typography/Body1.svelte @@ -0,0 +1,5 @@ + + +{text} diff --git a/packages/materialdesign-components/src/Typography/Body2.svelte b/packages/materialdesign-components/src/Typography/Body2.svelte new file mode 100644 index 0000000000..5e1cbb850d --- /dev/null +++ b/packages/materialdesign-components/src/Typography/Body2.svelte @@ -0,0 +1,5 @@ + + +{text} diff --git a/packages/materialdesign-components/src/Typography/Caption.svelte b/packages/materialdesign-components/src/Typography/Caption.svelte new file mode 100644 index 0000000000..17d60048d3 --- /dev/null +++ b/packages/materialdesign-components/src/Typography/Caption.svelte @@ -0,0 +1,5 @@ + + +
diff --git a/packages/materialdesign-components/src/Typography/H1.svelte b/packages/materialdesign-components/src/Typography/H1.svelte new file mode 100644 index 0000000000..f5daec4c67 --- /dev/null +++ b/packages/materialdesign-components/src/Typography/H1.svelte @@ -0,0 +1,5 @@ + + +