diff --git a/apps/vr-tests-react-components/src/stories/Checkbox.stories.tsx b/apps/vr-tests-react-components/src/stories/Checkbox.stories.tsx deleted file mode 100644 index 375a23d90e89b..0000000000000 --- a/apps/vr-tests-react-components/src/stories/Checkbox.stories.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import * as React from 'react'; -import { Steps, StoryWright } from 'storywright'; -import { storiesOf } from '@storybook/react'; -import { Checkbox } from '@fluentui/react-checkbox'; -import { TestWrapperDecoratorFixedWidth } from '../utilities/TestWrapperDecorator'; - -storiesOf('Checkbox Converged', module) - .addDecorator(TestWrapperDecoratorFixedWidth) - .addDecorator(story => ( - - {story()} - - )) - .addStory('unchecked', () => , { includeRtl: true }) - .addStory('checked', () => ) - .addStory('mixed', () => ) - .addStory('disabled', () => ); - -storiesOf('Checkbox Converged', module) - .addDecorator(TestWrapperDecoratorFixedWidth) - .addDecorator(story => ( - {story()} - )) - .addStory('disabled+checked', () => ) - .addStory('disabled+mixed', () => ) - .addStory('no-label', () => ) - .addStory('label-before', () => , { includeRtl: true }) - .addStory( - 'label-wrapping', - () => ( - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua - - } - /> - ), - { includeRtl: true }, - ) - .addStory('required', () => ) - .addStory('required+label-before', () => ( - - )) - .addStory('circular', () => ) - .addStory('circular+checked', () => ) - .addStory('circular+mixed', () => ) - // - // large variants - // - .addStory('large', () => , { includeRtl: true }) - .addStory('large+checked', () => ) - .addStory('large+mixed', () => ) - .addStory('large+circular', () => ) - .addStory('large+circular+checked', () => ( - - )) - .addStory('large+circular+mixed', () => ( - - )) - .addStory( - 'large+label-wrapping', - () => ( - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua - - } - /> - ), - { includeRtl: true }, - ); diff --git a/apps/vr-tests-react-components/src/stories/Checkbox/Checkbox.stories.tsx b/apps/vr-tests-react-components/src/stories/Checkbox/Checkbox.stories.tsx new file mode 100644 index 0000000000000..c634620275734 --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/Checkbox/Checkbox.stories.tsx @@ -0,0 +1,105 @@ +import * as React from 'react'; +import { Steps, StoryWright } from 'storywright'; +import type { Meta, StoryFn } from '@storybook/react'; +import { Checkbox } from '@fluentui/react-checkbox'; +import { getStoryVariant, RTL, TestWrapperDecoratorFixedWidth } from '../../utilities'; + +export default { + title: 'Checkbox Converged', + component: Checkbox, + decorators: [ + TestWrapperDecoratorFixedWidth, + story => ( + {story()} + ), + ], +} satisfies Meta; + +type Story = StoryFn; + +export const DisabledChecked: Story = () => ; +DisabledChecked.storyName = 'disabled+checked'; + +export const DisabledMixed: Story = () => ; +DisabledMixed.storyName = 'disabled+mixed'; + +export const NoLabel: Story = () => ; +NoLabel.storyName = 'no-label'; + +export const LabelBefore: Story = () => ; +LabelBefore.storyName = 'label-before'; + +export const LabelBeforeRTL = getStoryVariant(LabelBefore, RTL); + +export const LabelWrapping: Story = () => ( + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua + + } + /> +); +LabelWrapping.storyName = 'label-wrapping'; + +export const LabelWrappingRTL = getStoryVariant(LabelWrapping, RTL); + +export const Required: Story = () => ; +Required.storyName = 'required'; + +export const RequiredLabelBefore: Story = () => ( + +); +RequiredLabelBefore.storyName = 'required+label-before'; + +export const Circular: Story = () => ; +Circular.storyName = 'circular'; + +export const CircularChecked: Story = () => ; +CircularChecked.storyName = 'circular+checked'; + +export const CircularMixed: Story = () => ; +CircularMixed.storyName = 'circular+mixed'; + +// +// large variants +// +export const Large: Story = () => ; +Large.storyName = 'large'; + +export const LargeRTL = getStoryVariant(Large, RTL); + +export const LargeChecked: Story = () => ; +LargeChecked.storyName = 'large+checked'; + +export const LargeMixed: Story = () => ; +LargeMixed.storyName = 'large+mixed'; + +export const LargeCircular: Story = () => ; +LargeCircular.storyName = 'large+circular'; + +export const LargeCircularChecked: Story = () => ( + +); +LargeCircularChecked.storyName = 'large+circular+checked'; + +export const LargeCircularMixed: Story = () => ( + +); +LargeCircularMixed.storyName = 'large+circular+mixed'; + +export const LargeLabelWrapping: Story = () => ( + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua + + } + /> +); +LargeLabelWrapping.storyName = 'large+label-wrapping'; + +export const LargeLabelWrappingRTL = getStoryVariant(LargeLabelWrapping, RTL); diff --git a/apps/vr-tests-react-components/src/stories/Checkbox/CheckboxInteractions.stories.tsx b/apps/vr-tests-react-components/src/stories/Checkbox/CheckboxInteractions.stories.tsx new file mode 100644 index 0000000000000..3897a890df69f --- /dev/null +++ b/apps/vr-tests-react-components/src/stories/Checkbox/CheckboxInteractions.stories.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +import { Steps, StoryWright } from 'storywright'; +import type { Meta, StoryFn } from '@storybook/react'; +import { Checkbox } from '@fluentui/react-checkbox'; +import { getStoryVariant, RTL, TestWrapperDecoratorFixedWidth } from '../../utilities'; + +export default { + title: 'Checkbox Converged', + component: Checkbox, + decorators: [ + TestWrapperDecoratorFixedWidth, + story => ( + + {story()} + + ), + ], +} satisfies Meta; + +type Story = StoryFn; + +export const Unchecked: Story = () => ; +Unchecked.storyName = 'unchecked'; + +export const UncheckedRTL = getStoryVariant(Unchecked, RTL); + +export const Checked: Story = () => ; +Checked.storyName = 'checked'; + +export const Mixed: Story = () => ; +Mixed.storyName = 'mixed'; + +export const Disabled: Story = () => ; +Disabled.storyName = 'disabled';