import type { Meta, StoryObj } from '@storybook/react'; import { Rating } from './rating'; import React, { useState } from 'react'; const meta: Meta = { title: 'UI/Rating', component: Rating, render: args => , argTypes: { size: { control: 'select', options: ['sm', 'md', 'lg'], }, max: { control: 'number' }, readonly: { control: 'boolean' }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { max: 5, size: 'md', }, render: args => { const [value, setValue] = useState(3); return ; }, }; export const ReadOnly: Story = { args: { value: 4.5, readonly: true, size: 'sm', }, }; export const Large: Story = { args: { value: 4, size: 'lg', }, render: args => { const [value, setValue] = useState(4); return ; }, };