mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-29 02:50:46 +00:00
26 lines
555 B
TypeScript
26 lines
555 B
TypeScript
import type { ComponentPropsWithoutRef, FC } from 'react';
|
|
|
|
import { EmojiHTML } from '../emoji/html';
|
|
|
|
import type { DisplayNameProps } from './index';
|
|
|
|
export const DisplayNameSimple: FC<
|
|
Omit<DisplayNameProps, 'variant' | 'localDomain'> &
|
|
ComponentPropsWithoutRef<'span'>
|
|
> = ({ account, ...props }) => {
|
|
if (!account) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<bdi>
|
|
<EmojiHTML
|
|
{...props}
|
|
as='span'
|
|
htmlString={account.get('display_name_html')}
|
|
extraEmojis={account.get('emojis')}
|
|
/>
|
|
</bdi>
|
|
);
|
|
};
|