veza/apps/web/src/components/ui/Slider.stories.tsx
senke f597e8792a feat(storybook): expanded coverage for core UI components (batch 1)
- Added stories for: Button, Avatar, Switch, Slider, Alert, Progress
- Consolidated Button component to src/components/ui/button.tsx
- Removed legacy src/components/Button.tsx
2026-02-02 19:37:52 +01:00

54 lines
1,013 B
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { Slider } from './slider';
const meta = {
title: 'UI/Slider',
component: Slider,
tags: ['autodocs'],
argTypes: {
value: { control: { type: 'range', min: 0, max: 100 } },
min: { control: 'number' },
max: { control: 'number' },
step: { control: 'number' },
disabled: { control: 'boolean' },
},
args: {
min: 0,
max: 100,
step: 1,
}
} satisfies Meta<typeof Slider>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
value: [50],
},
};
export const CustomRange: Story = {
args: {
min: 0,
max: 10,
step: 0.1,
value: [5.5],
},
};
export const Disabled: Story = {
args: {
value: [30],
disabled: true,
},
};
export const Steps: Story = {
args: {
min: 0,
max: 100,
step: 25,
value: [25],
},
};