mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
Add slider component
This commit is contained in:
@@ -15,3 +15,4 @@ export * from './date-picker';
|
|||||||
export * from './scroll-area';
|
export * from './scroll-area';
|
||||||
export * from './paper';
|
export * from './paper';
|
||||||
export * from './tabs';
|
export * from './tabs';
|
||||||
|
export * from './slider';
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import {
|
||||||
|
Slider as MantineSlider,
|
||||||
|
SliderProps as MantineSliderProps,
|
||||||
|
} from '@mantine/core';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
type SliderProps = MantineSliderProps;
|
||||||
|
|
||||||
|
const StyledSlider = styled(MantineSlider)`
|
||||||
|
& .mantine-Slider-track {
|
||||||
|
height: 0.5rem;
|
||||||
|
background-color: var(--slider-track-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
& .mantine-Slider-thumb {
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .mantine-Slider-label {
|
||||||
|
padding: 0 1rem;
|
||||||
|
color: var(--tooltip-fg);
|
||||||
|
font-size: 1em;
|
||||||
|
background: var(--tooltip-bg);
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const Slider = ({ ...props }: SliderProps) => {
|
||||||
|
return <StyledSlider {...props} />;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user