import React from 'react'; import {ImgSrcProvider} from '@moda/imgsrc'; import {storiesOf} from '@storybook/react'; import { RetinaImage, LazyRetinaImage } from '../../src/gui/shared/components/retina_image'; import {ResponsiveImage} from '../../src/gui/shared/components/responsive_image'; const sampleSrc = 'https://assets13.modaoperandi.com/images/products/719741/328233/b/large_proenza-schouler-yellow-tie-dye-cotton-and-modal-blend-turtleneck-top.jpg?_v=1565117465'; storiesOf('Shared', module) .add('RetinaImage', () => ( )) .add('RetinaImage (without `src`)', () => ( <> You shouldn’t see anything but this message. )) .add('RetinaImage (error handling)', () => ( <> You shouldn’t see anything but this message. )) .add('RetinaImage (lazy)', () => ( <> {new Array(100).fill(undefined).map((_, i) => (

scroll down

))} )) .add('ResponsiveImage', () => ( )) .add('ResponsiveImage (lazy)', () => ( <> {new Array(100).fill(undefined).map((_, i) => (

scroll down

))} )) .add('ResponsiveImage (error handling)', () => ( )) .add('ResponsiveImage (lazy, error handling)', () => ( <> {new Array(100).fill(undefined).map((_, i) => (

scroll down

))} ));