Skip to content

Commit

Permalink
More fun story
Browse files Browse the repository at this point in the history
  • Loading branch information
wardoost committed Oct 16, 2019
1 parent 395e50a commit 2d97cdf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/__stories__/useSlider.story.tsx
Expand Up @@ -9,11 +9,11 @@ const Demo = () => {

return (
<div>
<div ref={ref} style={{ position: 'relative', background: 'lightgray', padding: 4 }}>
<p style={{ margin: 0, textAlign: 'center', color: state.isSliding ? 'red' : 'green' }}>
{Math.round(state.value * 100)}%
</p>
<div style={{ position: 'absolute', top: 0, left: state.value * state.length - 10 }}>🎚</div>
<div ref={ref} style={{ position: 'relative', background: 'yellow', padding: 4 }}>
<p style={{ margin: 0, textAlign: 'center' }}>Slide me</p>
<div style={{ position: 'absolute', top: 0, left: state.pos, transform: 'scale(2)' }}>
{state.isSliding ? '🏂' : '🎿'}
</div>
</div>
<pre>{JSON.stringify(state, null, 2)}</pre>
</div>
Expand Down

0 comments on commit 2d97cdf

Please sign in to comment.