mirror of
https://github.com/outline/outline.git
synced 2026-11-30 09:00:18 +03:00
24 lines
636 B
TypeScript
24 lines
636 B
TypeScript
import type { Props as SuggestionsMenuItemProps } from "./SuggestionsMenuItem";
|
|
import SuggestionsMenuItem from "./SuggestionsMenuItem";
|
|
import { Emoji } from "~/components/Emoji";
|
|
import { CustomEmoji } from "@shared/components/CustomEmoji";
|
|
import { isUUID } from "validator";
|
|
|
|
type EmojiMenuItemProps = Omit<
|
|
SuggestionsMenuItemProps,
|
|
"shortcut" | "theme"
|
|
> & {
|
|
emoji: string;
|
|
};
|
|
|
|
export default function EmojiMenuItem({ emoji, ...rest }: EmojiMenuItemProps) {
|
|
return (
|
|
<SuggestionsMenuItem
|
|
{...rest}
|
|
icon={
|
|
isUUID(emoji) ? <CustomEmoji value={emoji} /> : <Emoji>{emoji}</Emoji>
|
|
}
|
|
/>
|
|
);
|
|
}
|