diff --git a/apps/meteor/client/components/ListItem.stories.tsx b/apps/meteor/client/components/ListItem.stories.tsx new file mode 100644 index 0000000000000..712e9f46ea666 --- /dev/null +++ b/apps/meteor/client/components/ListItem.stories.tsx @@ -0,0 +1,86 @@ +import { Tile, OptionTitle, Box } from '@rocket.chat/fuselage'; +import type { ComponentMeta, ComponentStory } from '@storybook/react'; +import React from 'react'; + +import ListItem from './Sidebar/ListItem'; + +export default { + title: 'Components/ListItem', + component: Tile, + parameters: { + docs: { + description: { + component: '`ListItem` can be used on DropDown lists, to render an item with icon and text.', + }, + }, + }, +} as ComponentMeta; + +export const ListWithIcon: ComponentStory = () => { + return ( + + + Title + + + + + + + ); +}; +export const NoIcon: ComponentStory = () => { + return ( + + + Title + + + + + + + ); +}; + +export const MixedWithGap: ComponentStory = () => { + return ( + + + Title + + + + + + + ); +}; +MixedWithGap.parameters = { + docs: { + description: { + story: + " When using `ListItem`, you can also use the `gap` prop to add spacing to the left. If the list is mixed with items **with and without** icons, it's recommended to add the gap.", + }, + }, +}; +export const MixedWithoutGap: ComponentStory = () => { + return ( + + + Title + + + + + + + ); +}; +MixedWithoutGap.parameters = { + docs: { + description: { + story: 'Not recommended. Prefer adding the `gap` prop to the items without icons.', + }, + }, +};