(null);
const emojiStyle = useEmojiStyleConfig();
const [variationPickerEmoji] = useEmojiVariationPickerState();
const getEmojiUrl = useGetEmojiUrlConfig();
useEmojiPreviewEvents(previewConfig.showPreview, setPreviewEmoji);
const emoji = emojiByUnified(previewEmoji?.originalUnified);
const show = emoji != null && previewEmoji != null;
return ;
function PreviewContent() {
const defaultEmoji = variationPickerEmoji ?? emojiByUnified(previewConfig.defaultEmoji)
if (!defaultEmoji) {
return null
}
const defaultText = variationPickerEmoji
? emojiName(variationPickerEmoji)
: previewConfig.defaultCaption;
return (
<>
{show ? (
) : defaultEmoji ? (
) : null}
{show ? (
{emojiName(emoji)}
) : (
{defaultText}
)}
>
);
}
}
export type PreviewEmoji = null | {
unified: string;
originalUnified: string;
};