2021-01-29 21:19:24 +00:00
|
|
|
// Copyright 2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import * as React from 'react';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
2023-10-11 19:06:43 +00:00
|
|
|
import type { Meta } from '@storybook/react';
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { Props } from './PanelSection';
|
|
|
|
import { PanelSection } from './PanelSection';
|
2021-01-29 21:19:24 +00:00
|
|
|
import { PanelRow } from './PanelRow';
|
|
|
|
|
2022-06-07 00:48:02 +00:00
|
|
|
export default {
|
|
|
|
title: 'Components/Conversation/ConversationDetails/PanelSection',
|
2023-10-11 19:06:43 +00:00
|
|
|
argTypes: {},
|
|
|
|
args: {
|
2021-01-29 21:19:24 +00:00
|
|
|
title: 'this is a panel row',
|
2023-10-11 19:06:43 +00:00
|
|
|
centerTitle: false,
|
|
|
|
actions: null,
|
|
|
|
},
|
|
|
|
} satisfies Meta<Props>;
|
2021-01-29 21:19:24 +00:00
|
|
|
|
2023-10-11 19:06:43 +00:00
|
|
|
export function Basic(args: Props): JSX.Element {
|
|
|
|
return <PanelSection {...args} />;
|
2022-11-18 00:45:19 +00:00
|
|
|
}
|
2021-01-29 21:19:24 +00:00
|
|
|
|
2023-10-11 19:06:43 +00:00
|
|
|
export function Centered(args: Props): JSX.Element {
|
|
|
|
return <PanelSection {...args} centerTitle />;
|
2022-11-18 00:45:19 +00:00
|
|
|
}
|
2021-01-29 21:19:24 +00:00
|
|
|
|
2023-10-11 19:06:43 +00:00
|
|
|
export function WithActions(args: Props): JSX.Element {
|
|
|
|
return (
|
|
|
|
<PanelSection
|
|
|
|
{...args}
|
|
|
|
actions={
|
|
|
|
<button onClick={action('actions onClick')} type="button">
|
|
|
|
action
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
2021-01-29 21:19:24 +00:00
|
|
|
|
2023-10-11 19:06:43 +00:00
|
|
|
export function WithContent(args: Props): JSX.Element {
|
2021-01-29 21:19:24 +00:00
|
|
|
return (
|
2023-10-11 19:06:43 +00:00
|
|
|
<PanelSection {...args}>
|
2021-01-29 21:19:24 +00:00
|
|
|
<PanelRow label="this is panel row one" />
|
|
|
|
<PanelRow label="this is panel row two" />
|
|
|
|
<PanelRow label="this is panel row three" />
|
|
|
|
<PanelRow label="this is panel row four" />
|
|
|
|
</PanelSection>
|
|
|
|
);
|
2022-11-18 00:45:19 +00:00
|
|
|
}
|