Skip to content

Commit 53ae455

Browse files
authored
Progress value fixed (#591)
1 parent f9a21a0 commit 53ae455

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/components/ui/Progress/stories/Progress.stories.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff 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
2822
export const All = {
2923
args: {

0 commit comments

Comments
 (0)