/*! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */ import { storiesOf } from '@storybook/react'; import { Image, ImageFit, Label, Layer, IImageProps } from 'office-ui-fabric-react'; import * as React from 'react'; import Screener from 'screener-storybook/src/screener'; import { FabricDecorator } from '../utilities'; const img350x150 = 'http://placehold.it/350x150'; const imagePropsFitNone: IImageProps = { src: 'http://placehold.it/500x250', imageFit: ImageFit.none, width: 350, height: 150, }; const imagePropsFitCenter: IImageProps = { src: 'http://placehold.it/800x300', imageFit: ImageFit.center, width: 350, height: 150, }; const imagePropsFitContain: IImageProps = { src: 'http://placehold.it/700x300', imageFit: ImageFit.contain, }; const imagePropsFitCover: IImageProps = { src: 'http://placehold.it/500x500', imageFit: ImageFit.cover, }; const imagePropsFitCenterContain: IImageProps = { src: 'http://placehold.it/400x400', imageFit: ImageFit.centerContain, }; const imagePropsFitCenterCover: IImageProps = { src: 'http://placehold.it/400x400', imageFit: ImageFit.centerCover, }; const imagePropsMaximizeFrame: IImageProps = { src: 'http://placehold.it/500x500', imageFit: ImageFit.cover, maximizeFrame: true, }; const border = 'solid 1px black'; storiesOf('Image', module) .addDecorator(FabricDecorator) .addDecorator(story => // prettier-ignore {story()} , ) .addStory('No fit, no w/h', () => (
)) .addStory('No fit, only width', () => (
)) .addStory('No fit, only height', () => (
)) .addStory('Fit: none, image larger', () => (
)) .addStory('Fit: none, image smaller', () => (
)) .addStory('Fit: center, image larger', () => (
)) .addStory('Fit: center, image smaller', () => (
)) .addStory('Fit: contain, image wider', () => (
)) .addStory('Fit: contain, image taller', () => (
)) .addStory('Fit: cover, image wider', () => (
)) .addStory('Fit: cover, image taller', () => (
)) .addStory('Fit: CenterContain, image smaller', () => (
)) .addStory('Fit: CenterContain, image larger', () => (
)) .addStory('Fit: CenterContain, image wider', () => (
)) .addStory('Fit: CenterContain, image taller', () => (
)) .addStory('Fit: centerCover, image smaller', () => (
)) .addStory('Fit: centerCover, image larger', () => (
)) .addStory('Fit: centerCover, image wider', () => (
)) .addStory('Fit: centerCover, image taller', () => (
)) .addStory('Maximize frame, landscape container', () => (
)) .addStory('Maximize frame, portrait container', () => sdfsfdsf);