Skip to content

Commit

Permalink
fix(rating): update scenario to controlled value (uber#3060)
Browse files Browse the repository at this point in the history
  • Loading branch information
chasestarr authored Mar 17, 2020
1 parent 9c8a000 commit 50e6f6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rating/__tests__/rating-emoticon.scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ import * as React from 'react';
import {EmoticonRating} from '../index.js';

export default function Scenario() {
return <EmoticonRating value={3} />;
const [value, setValue] = React.useState(3);
return (
<EmoticonRating value={value} onChange={({value: v}) => setValue(v)} />
);
}

0 comments on commit 50e6f6a

Please sign in to comment.