// Copyright 2020-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import { storiesOf } from '@storybook/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 ; }; storiesOf('Components/Conversation/ConversationHero', module) .add('Direct (Five Other Groups)', () => { return (
); }) .add('Direct (Four Other Groups)', () => { return (
); }) .add('Direct (Three Other Groups)', () => { return (
); }) .add('Direct (Two Other Groups)', () => { return (
); }) .add('Direct (One Other Group)', () => { return (
); }) .add('Direct (No Groups, Name)', () => { return (
); }) .add('Direct (No Groups, Just Profile)', () => { return (
); }) .add('Direct (No Groups, Just Phone Number)', () => { return (
); }) .add('Direct (No Groups, No Data)', () => { return (
); }) .add('Direct (No Groups, No Data, Not Accepted)', () => { return (
); }) .add('Group (many members)', () => { return (
); }) .add('Group (one member)', () => { return (
); }) .add('Group (zero members)', () => { return (
); }) .add('Group (long group description)', () => { return (
); }) .add('Group (No name)', () => { return (
); }) .add('Note to Self', () => { return (
); });