spreadLayout.stories.js 987 B

12345678910111213141516171819202122232425
  1. import React from 'react';
  2. import {storiesOf} from '@storybook/react';
  3. import {withInfo} from '@storybook/addon-info';
  4. import SpreadLayout from 'app/components/spreadLayout';
  5. storiesOf('Deprecated|ComponentLayouts/SpreadLayout', module)
  6. .add(
  7. 'default',
  8. withInfo('Children elements get spread out (flexbox space-between)')(() => (
  9. <SpreadLayout style={{backgroundColor: '#fff'}}>
  10. <div style={{padding: 6, backgroundColor: 'rgba(0, 0, 0, 0.2)'}}>Spread</div>
  11. <div style={{padding: 12, backgroundColor: 'rgba(0, 0, 0, 0.1)'}}>Layout</div>
  12. </SpreadLayout>
  13. ))
  14. )
  15. .add(
  16. 'no center',
  17. withInfo('Children elements get spread out (flexbox space-between)')(() => (
  18. <SpreadLayout center={false} style={{backgroundColor: '#fff'}}>
  19. <div style={{padding: 6, backgroundColor: 'rgba(0, 0, 0, 0.2)'}}>Spread</div>
  20. <div style={{padding: 12, backgroundColor: 'rgba(0, 0, 0, 0.1)'}}>Layout</div>
  21. </SpreadLayout>
  22. ))
  23. );