chore(components): improve props

This commit is contained in:
Benjamin Canac
2024-06-28 18:13:03 +02:00
parent c9f9a248b7
commit 673064dee5
38 changed files with 260 additions and 137 deletions

View File

@@ -11,12 +11,17 @@ const slider = tv({ extend: tv(theme), ...(appConfig.ui?.slider || {}) })
type SliderVariants = VariantProps<typeof slider>
export interface SliderProps extends Omit<SliderRootProps, 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'orientation'> {
export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' | 'inverted' | 'min' | 'max' | 'step' | 'minStepsBetweenThumbs'> {
/**
* The element or component this component should render as.
* @defaultValue `div`
*/
as?: any
size?: SliderVariants['size']
color?: SliderVariants['color']
/**
* The orientation of the slider.
* @defaultValue `'horizontal'`
* @defaultValue 'horizontal'
*/
orientation?: SliderRootProps['orientation']
/** The value of the slider when initially rendered. Use when you do not need to control the state of the slider. */