Loëck Vézien
7 years ago
3 changed files with 22 additions and 51 deletions
@ -1,15 +1,25 @@ |
|||||
import React from 'react' |
import React from 'react' |
||||
import { storiesOf } from '@storybook/react' |
import { storiesOf } from '@storybook/react' |
||||
|
import { boolean } from '@storybook/addon-knobs' |
||||
|
|
||||
import Box from 'components/base/Box' |
import Box from 'components/base/Box' |
||||
import GrowScroll from 'components/base/GrowScroll' |
import GrowScroll from 'components/base/GrowScroll' |
||||
|
|
||||
const stories = storiesOf('GrowScroll', module) |
const stories = storiesOf('GrowScroll', module) |
||||
|
|
||||
stories.add('basic', () => ( |
stories.add('basic', () => { |
||||
<Box style={{ border: '1px solid black' }}> |
const reverseColor = boolean('reverseColor', false) |
||||
<GrowScroll maxHeight={400}> |
|
||||
{[...Array(1000).keys()].map(v => <div key={v}>{v}</div>)} |
return ( |
||||
</GrowScroll> |
<Box |
||||
</Box> |
borderWidth={1} |
||||
)) |
borderColor="night" |
||||
|
bg={reverseColor ? 'night' : 'white'} |
||||
|
color={reverseColor ? 'white' : 'night'} |
||||
|
> |
||||
|
<GrowScroll maxHeight={400}> |
||||
|
{[...Array(1000).keys()].map(v => <div key={v}>{v}</div>)} |
||||
|
</GrowScroll> |
||||
|
</Box> |
||||
|
) |
||||
|
}) |
||||
|
Loading…
Reference in new issue