2018-05-18 23:57:26 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2020-07-24 01:35:32 +00:00
|
|
|
import { LocalizerType } from '../../types/Util';
|
2020-07-29 23:20:05 +00:00
|
|
|
import { Emojify } from './Emojify';
|
2018-05-18 23:57:26 +00:00
|
|
|
|
2020-07-29 23:20:05 +00:00
|
|
|
export interface PropsType {
|
|
|
|
i18n: LocalizerType;
|
2020-07-24 01:35:32 +00:00
|
|
|
title: string;
|
2020-07-29 23:20:05 +00:00
|
|
|
module?: string;
|
2018-05-18 23:57:26 +00:00
|
|
|
name?: string;
|
2020-07-29 23:20:05 +00:00
|
|
|
phoneNumber?: string;
|
2018-05-18 23:57:26 +00:00
|
|
|
profileName?: string;
|
|
|
|
}
|
|
|
|
|
2020-09-14 19:51:27 +00:00
|
|
|
export const ContactName = ({ module, title }: PropsType): JSX.Element => {
|
|
|
|
const prefix = module || 'module-contact-name';
|
2018-05-18 23:57:26 +00:00
|
|
|
|
2020-09-14 19:51:27 +00:00
|
|
|
return (
|
|
|
|
<span className={prefix} dir="auto">
|
|
|
|
<Emojify text={title || ''} />
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
};
|