File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/components/ui/Progress/stories Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,17 @@ export default {
77 title : 'Components/Progress' ,
88 component : Progress ,
99 render : ( args ) => {
10- const [ value , setValue ] = useState ( getRandomValue ( ) ) ;
11-
12- useEffect ( ( ) => {
13- const intervalId = setInterval ( ( ) => setValue ( getRandomValue ( ) ) , 2345 ) ;
14-
15- return ( ) => clearInterval ( intervalId ) ;
16- } ) ;
10+
1711
1812 return ( < SandboxEditor >
1913 < div className = 'my-10' >
20- < Progress value = { value } />
14+ < Progress { ... args } />
2115 </ div >
2216 </ SandboxEditor > ) ;
2317 }
2418} ;
2519
26- const getRandomValue = ( ) => Math . trunc ( ( Math . random ( ) * 100 ) ) ;
20+
2721// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
2822export const All = {
2923 args : {
You can’t perform that action at this time.
0 commit comments