// Copyright 2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { Story } from '@storybook/react'; import React from 'react'; import { ListTile } from './ListTile'; import type { Props } from './ListTile'; import { CircleCheckbox } from './CircleCheckbox'; import { UserText } from './UserText'; export default { title: 'Components/ListTile', component: ListTile, }; const lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam feugiat quam vitae semper facilisis. Praesent eu efficitur dui. Donec semper mattis nisl non hendrerit.'; function TemplateList(width: number): Story { // eslint-disable-next-line react/display-name return args => { return (
} clickable /> } clickable /> } subtitle="Clickable" clickable /> } subtitle={ } />
); }; } const circleAvatar = (
); export const Item = TemplateList(400).bind({}); Item.args = { leading: circleAvatar, title: , subtitle: 'Hello my friend', clickable: true, }; export const PanelRow = TemplateList(800).bind({}); PanelRow.args = { leading: circleAvatar, title: 'Some user', subtitle: 'Hello my friend', trailing:
Admin
, clickable: false, variant: 'panelrow', };