/*! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */ import * as React from 'react'; import Screener, { Steps } from 'screener-storybook/src/screener'; import { storiesOf } from '@storybook/react'; import { FabricDecorator, FabricDecoratorTall } from '../utilities'; import { DefaultButton, ActionButton, CompoundButton, IconButton, IButtonProps, CommandBarButton, } from 'office-ui-fabric-react'; const baseProps: IButtonProps = { iconProps: { iconName: 'AddFriend', }, children: 'Button', secondaryText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor', }; const commandProps: IButtonProps = { iconProps: { iconName: 'Add' }, text: 'Create account', onClick: () => alert('Clicked'), menuProps: { items: [ { key: 'emailMessage', text: 'Email message', iconProps: { iconName: 'Mail', }, }, { key: 'calendarEvent', text: 'Calendar event', iconProps: { iconName: 'Calendar', }, }, ], }, }; storiesOf('Button Default', module) .addDecorator(FabricDecorator) .addDecorator(story => ( {story()} )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) .addStory('Checked', () => ) .addStory('Primary', () => ) .addStory('Primary Disabled', () => ( )) .addStory('Primary Checked', () => ( )); storiesOf('Button Action', module) .addDecorator(FabricDecorator) .addDecorator(story => ( {story()} )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) .addStory('Checked', () => ); storiesOf('Button Compound', module) .addDecorator(FabricDecorator) .addDecorator(story => ( {story()} )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) .addStory('Checked', () => ) .addStory('Primary', () => ) .addStory('Primary Disabled', () => ( )) .addStory('Primary Checked', () => ( )); storiesOf('Button Command', module) .addDecorator(story => (
{story()}
)) .addDecorator(FabricDecoratorTall) .addDecorator(story => ( {story()} )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) .addStory('Checked', () => ); storiesOf('Button Split', module) .addDecorator(FabricDecoratorTall) .addDecorator(story => ( {story()} )) .addStory('Root', () => , { rtl: true }) .addStory('Disabled', () => ) .addStory('Default with Primary Action Disabled', () => ( )) .addStory('Checked', () => ) .addStory('Primary', () => ) .addStory('Primary Disabled', () => ( )) .addStory('Primary with Primary Action Disabled', () => ( )) .addStory('Primary Checked', () => ( )) .addStory('Command Split', () => ); storiesOf('Button Special Scenarios', module) .addDecorator(FabricDecorator) .addDecorator(story => ( {story()} )) .addStory('primary with placeholder', () => (

)) .addStory('no flex shrink', () => (
)); storiesOf('IconButton Scenarios', module) .addDecorator(FabricDecorator) .addDecorator(story => ( {story()} )) .addStory('normal icon button', () => (
)) .addStory('icon button with menu', () => (
));