From 0b7473d9de444a10f7ebbcec74ca9e4fcffbf7e7 Mon Sep 17 00:00:00 2001 From: Alex Windett Date: Wed, 11 Jan 2017 14:03:53 +0000 Subject: [PATCH] moving avatar story and data used for it --- ui/src/components/avatar/story.js | 40 +++++++++++++ .../seed.js => src/shared/fake-data/index.js} | 4 ++ ui/stories/index.js | 57 +------------------ 3 files changed, 47 insertions(+), 54 deletions(-) create mode 100644 ui/src/components/avatar/story.js rename ui/{stories/seed.js => src/shared/fake-data/index.js} (69%) diff --git a/ui/src/components/avatar/story.js b/ui/src/components/avatar/story.js new file mode 100644 index 00000000..d17e80d5 --- /dev/null +++ b/ui/src/components/avatar/story.js @@ -0,0 +1,40 @@ +const React = require('react'); +const fakeData = require('../../shared/fake-data'); +const Base = require('../base'); + +const { + profile +} = fakeData; + +const { + storiesOf +} = require('@kadira/storybook'); + +const Avatar = require('./'); + +storiesOf('Avatar', module) + .add('Avatar Picture', () => ( + + + + )) + .add('Avatar Text', () => ( + + + + + + )); \ No newline at end of file diff --git a/ui/stories/seed.js b/ui/src/shared/fake-data/index.js similarity index 69% rename from ui/stories/seed.js rename to ui/src/shared/fake-data/index.js index 8a8effca..366dce5e 100644 --- a/ui/stories/seed.js +++ b/ui/src/shared/fake-data/index.js @@ -25,6 +25,10 @@ const selectData = [ } ]; +// eslint-disable-next-line max-len +const profile = 'https://pbs.twimg.com/profile_images/641289584580493312/VBfsPlff_400x400.jpg'; + module.exports = { + profile, selectData }; \ No newline at end of file diff --git a/ui/stories/index.js b/ui/stories/index.js index 31893971..cea79c18 100644 --- a/ui/stories/index.js +++ b/ui/stories/index.js @@ -7,7 +7,6 @@ const { const { Base, - // Button, Container, Checkbox, Row, @@ -20,7 +19,6 @@ const { AddMetricTile, AddMetricTitle }, - Avatar, Input, List: { ListItemDescription, @@ -56,10 +54,11 @@ const { RadioGroup } = require('../src/'); -const seed = require('./seed'); +const fakeData = require('../src/shared/fake-data'); + const { selectData -} = seed; +} = fakeData; const styles = { base: { @@ -115,10 +114,6 @@ storiesOf('Grid', module) )); -const profile = - 'https://pbs.twimg.com/profile_images/' + - '641289584580493312/VBfsPlff_400x400.jpg'; - storiesOf('Add Metric', module) .add('Add Metric', () => ( @@ -153,52 +148,6 @@ storiesOf('Add Metric', module) )); -storiesOf('Avatar', module) - .add('Avatar Picture', () => ( - - )) - .add('Avatar Text', () => ( - - - - - - )); - -// storiesOf('Button', module) -// .add('With text', () => ( -// -// )).add('Secondary', () => ( -// -// )).add('Disabled', () => ( -// -// )).add('Anchor', () => ( -//
-// -//
-// )); - storiesOf('Checkbox', module) .add('Default', () => (