Skip to content

Commit

Permalink
fix: keyboard rating
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Dec 2, 2024
1 parent f7e2a76 commit bd9ddba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions stories/Components/Rating.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ export default meta;
type Story = StoryObj<typeof Rating>;

export const RatingBase: Story = {
render: ({ value, legend }) => {
render: ({ legend }) => {
const [rating, setRating] = useState(0);
return (
<Rating value={value} legend={legend} inputs={['star1a', 'star2a', 'star3a', 'star4a', 'star5a']} name='ratingA' />
<Rating
value={rating}
legend={legend}
inputs={['star1a', 'star2a', 'star3a', 'star4a', 'star5a']}
name='ratingA'
onChangeRating={setRating}
/>
);
},
args: {
Expand Down

0 comments on commit bd9ddba

Please sign in to comment.