woocommerce/plugins/woocommerce-blocks/packages/components/chip/stories/removable-chip.stories.tsx

34 lines
705 B
TypeScript
Raw Normal View History

/**
* External dependencies
*/
import type { Story, Meta } from '@storybook/react';
/**
* Internal dependencies
*/
import { RemovableChip, RemovableChipProps } from '../removable-chip';
const availableElements = [ 'li', 'div', 'span' ];
export default {
Add Notices Documentation to Storybook and upgrade to Storybook 7 (https://github.com/woocommerce/woocommerce-blocks/pull/11524) * Rename stories * MDX guidelines * dedupe and fix dependencies * Notice Banner Docs * Fix root elements and icon library docs * Fix ProductPrice stories * Organise storybook structure * Fix error placeholder story * Snackbar docs * Missing dotenv dependency * Update storybook/main.js Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/notice-banner/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update assets/js/base/components/snackbar-list/docs/docs.mdx Co-authored-by: Alex Florisca <alex.florisca@automattic.com> * Update package lock * update snaps * fix json error check --------- Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
2023-11-02 13:01:42 +00:00
title: 'Block Components/RemovableChip',
component: RemovableChip,
argTypes: {
element: {
control: 'radio',
options: availableElements,
},
},
} as Meta< RemovableChipProps >;
const Template: Story< RemovableChipProps > = ( args ) => (
<RemovableChip { ...args } />
);
export const Default = Template.bind( {} );
Default.args = {
element: 'li',
text: 'Take me to the casino',
screenReaderText: "I'm a removable chip, me",
};