You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReact,{Suspense}from"react";// @ts-ignore - alternatively, add `declare module "@emoji-mart/react"` to your project's type declarationsconstPicker=React.lazy(()=>import("@emoji-mart/react"));importtypeEmojiMartfrom"emoji-mart";exportdefaultfunctionEmojiPicker<TextendskeyoftypeofEmojiMart.Picker.Props>(props: Record<T,typeofEmojiMart.Picker.Props[T]["value"]>){return(<Suspensefallback={<></>}><Picker{...props}/></Suspense>);}
This gives some typescript support to the keys of the Picker function. However, the accepted values are still pretty loose.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Resolved in 5.3.3
This gives some typescript support to the keys of the
Picker
function. However, the accepted values are still pretty loose.Beta Was this translation helpful? Give feedback.
All reactions