diff --git a/packages/materialdesign-components/package.json b/packages/materialdesign-components/package.json index 93b4e3e233..7328dcfa0b 100644 --- a/packages/materialdesign-components/package.json +++ b/packages/materialdesign-components/package.json @@ -24,6 +24,7 @@ "@material/menu": "4.0.0", "@material/radio": "^4.0.0", "@material/select": "4.0.0", + "@material/slider": "4.0.0", "@material/switch": "4.0.0", "@material/textfield": "^4.0.0", "@nx-js/compiler-util": "^2.0.0", diff --git a/packages/materialdesign-components/src/Slider/Slider.svelte b/packages/materialdesign-components/src/Slider/Slider.svelte new file mode 100644 index 0000000000..9c3f1a6f38 --- /dev/null +++ b/packages/materialdesign-components/src/Slider/Slider.svelte @@ -0,0 +1,119 @@ + + +
+ + + + diff --git a/packages/materialdesign-components/src/Slider/_style.scss b/packages/materialdesign-components/src/Slider/_style.scss new file mode 100644 index 0000000000..0be8b2ea70 --- /dev/null +++ b/packages/materialdesign-components/src/Slider/_style.scss @@ -0,0 +1 @@ +@import "@material/slider/mdc-slider.scss" \ No newline at end of file diff --git a/packages/materialdesign-components/src/Slider/index.js b/packages/materialdesign-components/src/Slider/index.js new file mode 100644 index 0000000000..d59f34d7fe --- /dev/null +++ b/packages/materialdesign-components/src/Slider/index.js @@ -0,0 +1,2 @@ +import "./_style.scss" +export {default as Slider} from "./Slider.svelte" diff --git a/packages/materialdesign-components/src/Test/TestApp.svelte b/packages/materialdesign-components/src/Test/TestApp.svelte index 0391a4d9b2..d839988147 100644 --- a/packages/materialdesign-components/src/Test/TestApp.svelte +++ b/packages/materialdesign-components/src/Test/TestApp.svelte @@ -22,6 +22,7 @@ Card, Dialog, Switch, + Slider, } = props let currentComponent @@ -41,6 +42,7 @@ DatePicker, IconButton, Switch, + Slider, ], }, } diff --git a/packages/materialdesign-components/src/Test/props.js b/packages/materialdesign-components/src/Test/props.js index c5bf709045..75244cf0c8 100644 --- a/packages/materialdesign-components/src/Test/props.js +++ b/packages/materialdesign-components/src/Test/props.js @@ -313,5 +313,9 @@ export const props = { checked: true, onChange: () => console.log("Switch Changed"), _children: [], - } + }, + Slider: { + _component: "@budibase/materialdesign-components/Slider", + _children: [], + }, } diff --git a/packages/materialdesign-components/src/index.js b/packages/materialdesign-components/src/index.js index 1fe55d3fa6..14a5c6f583 100644 --- a/packages/materialdesign-components/src/index.js +++ b/packages/materialdesign-components/src/index.js @@ -24,3 +24,4 @@ export { IconButton } from "./IconButton" export { Card, CardHeader, CardImage, CardBody, CardFooter } from "./Card" export { Dialog, DialogHeader, DialogContent, DialogActions } from "./Dialog" export { Switch } from "./Switch" +export { Slider } from "./Slider"