signal-desktop/ts/components/conversation/ContactName.tsx

27 lines
594 B
TypeScript
Raw Normal View History

// Copyright 2018-2021 Signal Messenger, LLC
2020-10-30 15:34:04 -05:00
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
2020-07-23 18:35:32 -07:00
import { LocalizerType } from '../../types/Util';
import { Emojify } from './Emojify';
export type PropsType = {
i18n: LocalizerType;
2020-07-23 18:35:32 -07:00
title: string;
module?: string;
name?: string;
phoneNumber?: string;
profileName?: string;
};
2020-09-14 12:51:27 -07:00
export const ContactName = ({ module, title }: PropsType): JSX.Element => {
const prefix = module || 'module-contact-name';
2020-09-14 12:51:27 -07:00
return (
<span className={prefix} dir="auto">
<Emojify text={title || ''} />
</span>
);
};