// Copyright 2020-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import { number as numberKnob, text } from '@storybook/addon-knobs'; import { action } from '@storybook/addon-actions'; import { ConversationHero } from './ConversationHero'; import { setupI18n } from '../../util/setupI18n'; import enMessages from '../../../_locales/en/messages.json'; import { StorybookThemeContext } from '../../../.storybook/StorybookThemeContext'; const i18n = setupI18n('en', enMessages); const getAbout = () => text('about', '👍 Free to chat'); const getTitle = () => text('name', 'Cayce Bollard'); const getName = () => text('name', 'Cayce Bollard'); const getProfileName = () => text('profileName', 'Cayce Bollard (profile)'); const getAvatarPath = () => text('avatarPath', '/fixtures/kitten-4-112-112.jpg'); const getPhoneNumber = () => text('phoneNumber', '+1 (646) 327-2700'); const updateSharedGroups = action('updateSharedGroups'); const Wrapper = ( props: Omit, 'theme'> ) => { const theme = React.useContext(StorybookThemeContext); return ; }; export default { title: 'Components/Conversation/ConversationHero', }; export const DirectFiveOtherGroups = (): JSX.Element => { return (
); }; DirectFiveOtherGroups.story = { name: 'Direct (Five Other Groups)', }; export const DirectFourOtherGroups = (): JSX.Element => { return (
); }; DirectFourOtherGroups.story = { name: 'Direct (Four Other Groups)', }; export const DirectThreeOtherGroups = (): JSX.Element => { return (
); }; DirectThreeOtherGroups.story = { name: 'Direct (Three Other Groups)', }; export const DirectTwoOtherGroups = (): JSX.Element => { return (
); }; DirectTwoOtherGroups.story = { name: 'Direct (Two Other Groups)', }; export const DirectOneOtherGroup = (): JSX.Element => { return (
); }; DirectOneOtherGroup.story = { name: 'Direct (One Other Group)', }; export const DirectNoGroupsName = (): JSX.Element => { return (
); }; DirectNoGroupsName.story = { name: 'Direct (No Groups, Name)', }; export const DirectNoGroupsJustProfile = (): JSX.Element => { return (
); }; DirectNoGroupsJustProfile.story = { name: 'Direct (No Groups, Just Profile)', }; export const DirectNoGroupsJustPhoneNumber = (): JSX.Element => { return (
); }; DirectNoGroupsJustPhoneNumber.story = { name: 'Direct (No Groups, Just Phone Number)', }; export const DirectNoGroupsNoData = (): JSX.Element => { return (
); }; DirectNoGroupsNoData.story = { name: 'Direct (No Groups, No Data)', }; export const DirectNoGroupsNoDataNotAccepted = (): JSX.Element => { return (
); }; DirectNoGroupsNoDataNotAccepted.story = { name: 'Direct (No Groups, No Data, Not Accepted)', }; export const GroupManyMembers = (): JSX.Element => { return (
); }; GroupManyMembers.story = { name: 'Group (many members)', }; export const GroupOneMember = (): JSX.Element => { return (
); }; GroupOneMember.story = { name: 'Group (one member)', }; export const GroupZeroMembers = (): JSX.Element => { return (
); }; GroupZeroMembers.story = { name: 'Group (zero members)', }; export const GroupLongGroupDescription = (): JSX.Element => { return (
); }; GroupLongGroupDescription.story = { name: 'Group (long group description)', }; export const GroupNoName = (): JSX.Element => { return (
); }; GroupNoName.story = { name: 'Group (No name)', }; export const NoteToSelf = (): JSX.Element => { return (
); }; NoteToSelf.story = { name: 'Note to Self', };