Skip to content

Commit 09ebaac

Browse files
committed
add stories for custom start times
1 parent 0a30f08 commit 09ebaac

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

stories/timers/Stopwatch.story.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,20 @@ import Stopwatch from '../../src/timers/Stopwatch';
55
storiesOf('Timers', module)
66
.add('StopWatch', () => (
77
<Stopwatch />
8-
));
8+
))
9+
.add('StopWatch with custom time at 1:40', () => {
10+
const startTime = new Date();
11+
const aMinuteAgo = startTime.getTime() - 100000;
12+
startTime.setTime(aMinuteAgo);
13+
return (
14+
<Stopwatch start={startTime}/>
15+
);
16+
})
17+
.add('StopWatch with custom time hour at 2:46:40', () => {
18+
const startTime = new Date();
19+
const aMinuteAgo = startTime.getTime() - 10000000;
20+
startTime.setTime(aMinuteAgo);
21+
return (
22+
<Stopwatch start={startTime}/>
23+
);
24+
});

0 commit comments

Comments
 (0)