Skip to content

Commit 7889b86

Browse files
committed
Add initial MUI slider component
1 parent 7740ebe commit 7889b86

File tree

1 file changed

+30
-0
lines changed
  • chartlets.js/packages/lib/src/plugins/mui

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import type { ElementType } from "react";
2+
import MuiSlider from "@mui/material/Slider";
3+
4+
import type { ComponentProps, ComponentState } from "@/index";
5+
6+
interface SliderState extends ComponentState {
7+
component?: ElementType<Element>;
8+
}
9+
10+
interface SliderProps extends ComponentProps, SliderState {
11+
defaultValue: number;
12+
}
13+
14+
export const Slider = ({
15+
id,
16+
style,
17+
defaultValue,
18+
component,
19+
// onChange,
20+
}: SliderProps) => {
21+
return (
22+
<MuiSlider
23+
id={id}
24+
style={style}
25+
defaultValue={defaultValue}
26+
// onChange={onChange}
27+
component={component || "div"}
28+
></MuiSlider>
29+
);
30+
};

0 commit comments

Comments
 (0)