Read Pinned Chats
Co-authored-by: Sidney Keese <sidney@carbonfive.com>
This commit is contained in:
parent
3ca547f3dd
commit
63b2644cb4
15 changed files with 444 additions and 46 deletions
|
@ -40,12 +40,32 @@ const defaultArchivedConversations: Array<PropsData> = [
|
|||
},
|
||||
];
|
||||
|
||||
const pinnedConversations: Array<PropsData> = [
|
||||
{
|
||||
id: 'philly-convo',
|
||||
isPinned: true,
|
||||
isSelected: false,
|
||||
lastUpdated: Date.now(),
|
||||
title: 'Philip Glass',
|
||||
type: 'direct',
|
||||
},
|
||||
{
|
||||
id: 'robbo-convo',
|
||||
isPinned: true,
|
||||
isSelected: false,
|
||||
lastUpdated: Date.now(),
|
||||
title: 'Robert Moog',
|
||||
type: 'direct',
|
||||
},
|
||||
];
|
||||
|
||||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||
archivedConversations:
|
||||
overrideProps.archivedConversations || defaultArchivedConversations,
|
||||
conversations: overrideProps.conversations || defaultConversations,
|
||||
i18n,
|
||||
openConversationInternal: action('openConversationInternal'),
|
||||
pinnedConversations: overrideProps.pinnedConversations || [],
|
||||
renderExpiredBuildDialog: () => <div />,
|
||||
renderMainHeader: () => <div />,
|
||||
renderMessageSearchResult: () => <div />,
|
||||
|
@ -69,6 +89,14 @@ story.add('Conversation States (Active, Selected, Archived)', () => {
|
|||
return <LeftPane {...props} />;
|
||||
});
|
||||
|
||||
story.add('Pinned Conversations', () => {
|
||||
const props = createProps({
|
||||
pinnedConversations,
|
||||
});
|
||||
|
||||
return <LeftPane {...props} />;
|
||||
});
|
||||
|
||||
story.add('Archived Conversations Shown', () => {
|
||||
const props = createProps({
|
||||
showArchived: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue