2018-05-18 16:57:26 -07:00
|
|
|
import React from 'react';
|
|
|
|
|
2020-07-23 18:35:32 -07:00
|
|
|
import { LocalizerType } from '../../types/Util';
|
2020-07-29 16:20:05 -07:00
|
|
|
import { Emojify } from './Emojify';
|
2018-05-18 16:57:26 -07:00
|
|
|
|
2020-07-29 16:20:05 -07:00
|
|
|
export interface PropsType {
|
|
|
|
i18n: LocalizerType;
|
2020-07-23 18:35:32 -07:00
|
|
|
title: string;
|
2020-07-29 16:20:05 -07:00
|
|
|
module?: string;
|
2018-05-18 16:57:26 -07:00
|
|
|
name?: string;
|
2020-07-29 16:20:05 -07:00
|
|
|
phoneNumber?: string;
|
2018-05-18 16:57:26 -07:00
|
|
|
profileName?: string;
|
|
|
|
}
|
|
|
|
|
2020-07-29 16:20:05 -07:00
|
|
|
export class ContactName extends React.Component<PropsType> {
|
2018-05-18 16:57:26 -07:00
|
|
|
public render() {
|
2020-07-23 18:35:32 -07:00
|
|
|
const { module, title } = this.props;
|
2018-07-09 14:29:13 -07:00
|
|
|
const prefix = module ? module : 'module-contact-name';
|
2018-05-18 16:57:26 -07:00
|
|
|
|
2020-02-05 17:28:54 -05:00
|
|
|
return (
|
|
|
|
<span className={prefix} dir="auto">
|
2020-06-18 15:28:45 -07:00
|
|
|
<Emojify text={title || ''} />
|
2018-05-18 16:57:26 -07:00
|
|
|
</span>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|