File
Blob: src/client/components/ui/emoji-picker.tsx
| 1 | import type { CSSProperties } from "react"; |
| 2 | import { lazy, Suspense } from "react"; |
| 3 | |
| 4 | const EmojiPickerImpl = lazy(() => import("./emoji-picker-impl").then((mod) => ({ default: mod.EmojiPickerImpl }))); |
| 5 | |
| 6 | interface EmojiPickerProps { |
| 7 | onSelect: (emoji: string) => void; |
| 8 | className?: string; |
| 9 | style?: CSSProperties; |
| 10 | } |
| 11 | |
| 12 | export 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 | } |