diff --git a/storybook/stories/Image/ImageWithFallback/ImageWithFallback.js b/storybook/stories/Image/ImageWithFallback/ImageWithFallback.js new file mode 100644 index 000000000..82cb90e2d --- /dev/null +++ b/storybook/stories/Image/ImageWithFallback/ImageWithFallback.js @@ -0,0 +1,15 @@ +const React = require('react'); +const { storiesOf } = require('@storybook/react'); +const Icon = require('stremio-icons/dom'); +const { Image } = require('stremio/common'); +const styles = require('./styles'); + +storiesOf('Image', module).add('ImageWithFallback', () => ( + ( + + )} + /> +)); diff --git a/storybook/stories/Image/ImageWithFallback/index.js b/storybook/stories/Image/ImageWithFallback/index.js new file mode 100644 index 000000000..f6111b11f --- /dev/null +++ b/storybook/stories/Image/ImageWithFallback/index.js @@ -0,0 +1 @@ +require('./ImageWithFallback'); diff --git a/storybook/stories/Image/ImageWithFallback/styles.less b/storybook/stories/Image/ImageWithFallback/styles.less new file mode 100644 index 000000000..69c02638a --- /dev/null +++ b/storybook/stories/Image/ImageWithFallback/styles.less @@ -0,0 +1,12 @@ +.image { + flex: none; + width: 10rem; + height: 10rem; +} + +.icon { + flex: none; + width: 10rem; + height: 10rem; + fill: white; +} \ No newline at end of file diff --git a/storybook/stories/Image/SampleImage/SampleImage.js b/storybook/stories/Image/SampleImage/SampleImage.js new file mode 100644 index 000000000..10880fff4 --- /dev/null +++ b/storybook/stories/Image/SampleImage/SampleImage.js @@ -0,0 +1,11 @@ +const React = require('react'); +const { storiesOf } = require('@storybook/react'); +const { Image } = require('stremio/common'); +const styles = require('./styles'); + +storiesOf('Image', module).add('SampleImage', () => ( + +)); diff --git a/storybook/stories/Image/SampleImage/index.js b/storybook/stories/Image/SampleImage/index.js new file mode 100644 index 000000000..73a345825 --- /dev/null +++ b/storybook/stories/Image/SampleImage/index.js @@ -0,0 +1 @@ +require('./SampleImage'); diff --git a/storybook/stories/Image/SampleImage/styles.less b/storybook/stories/Image/SampleImage/styles.less new file mode 100644 index 000000000..0527ceb9d --- /dev/null +++ b/storybook/stories/Image/SampleImage/styles.less @@ -0,0 +1,5 @@ +.image { + flex: none; + width: 10rem; + height: 10rem; +} \ No newline at end of file diff --git a/storybook/stories/Image/index.js b/storybook/stories/Image/index.js new file mode 100644 index 000000000..8f625d6dc --- /dev/null +++ b/storybook/stories/Image/index.js @@ -0,0 +1,2 @@ +require('./SampleImage'); +require('./ImageWithFallback'); diff --git a/storybook/stories/index.js b/storybook/stories/index.js index 2b2af422f..8ee1de155 100644 --- a/storybook/stories/index.js +++ b/storybook/stories/index.js @@ -1,6 +1,7 @@ require('./Addon'); require('./ColorInput'); require('./ColorPicker'); +require('./Image'); require('./MetaItem'); require('./ModalDialog'); require('./Multiselect');