2023-01-03 11:55:46 -08:00
|
|
|
// Copyright 2020 Signal Messenger, LLC
|
2020-10-30 15:34:04 -05:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-07-23 18:35:32 -07:00
|
|
|
import * as React from 'react';
|
2023-10-11 12:06:43 -07:00
|
|
|
import type { Meta } from '@storybook/react';
|
|
|
|
import type { PropsType } from './ContactName';
|
2020-07-23 18:35:32 -07:00
|
|
|
import { ContactName } from './ContactName';
|
2021-05-28 12:15:17 -04:00
|
|
|
import { ContactNameColors } from '../../types/Colors';
|
2020-07-23 18:35:32 -07:00
|
|
|
|
2022-06-06 20:48:02 -04:00
|
|
|
export default {
|
|
|
|
title: 'Components/Conversation/ContactName',
|
2023-10-11 12:06:43 -07:00
|
|
|
} satisfies Meta<PropsType>;
|
2022-06-06 20:48:02 -04:00
|
|
|
|
2022-11-17 16:45:19 -08:00
|
|
|
export function FirstNameAndTitleTitlePreferred(): JSX.Element {
|
|
|
|
return <ContactName firstName="Ignored" title="Someone 🔥 Somewhere" />;
|
|
|
|
}
|
2022-06-06 20:48:02 -04:00
|
|
|
|
2022-11-17 16:45:19 -08:00
|
|
|
export function FirstNameAndTitleFirstNamePreferred(): JSX.Element {
|
|
|
|
return (
|
|
|
|
<ContactName
|
|
|
|
firstName="Someone 🔥 Somewhere"
|
|
|
|
title="Ignored"
|
|
|
|
preferFirstName
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
2022-06-06 20:48:02 -04:00
|
|
|
|
2022-11-17 16:45:19 -08:00
|
|
|
export function Colors(): JSX.Element {
|
2022-06-06 20:48:02 -04:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{ContactNameColors.map(color => (
|
|
|
|
<div key={color}>
|
|
|
|
<ContactName title={`Hello ${color}`} contactNameColor={color} />
|
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</>
|
|
|
|
);
|
2022-11-17 16:45:19 -08:00
|
|
|
}
|