Skip to content
File

Blob: src/client/components/ui/emoji-picker.tsx

typescript21 lines
1import type { CSSProperties } from "react";
2import { lazy, Suspense } from "react";
3 
4const EmojiPickerImpl = lazy(() => import("./emoji-picker-impl").then((mod) => ({ default: mod.EmojiPickerImpl })));
5 
6interface EmojiPickerProps {
7 onSelect: (emoji: string) => void;
8 className?: string;
9 style?: CSSProperties;
10}
11 
12export function EmojiPicker({ onSelect, className, style }: EmojiPickerProps) {
13 return (
14 <Suspense
15 fallback={<div className="h-[400px] w-[360px] rounded-lg border border-zinc-700 bg-zinc-800" style={style} />}
16 >
17 <EmojiPickerImpl onSelect={onSelect} className={className} style={style} />
18 </Suspense>
19 );
20}