Last active
August 20, 2024 12:55
-
-
Save KrisKnez/46f151946e4be99047dfbd402969f2b4 to your computer and use it in GitHub Desktop.
em-emoji props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is the solution to the following error: | |
Property 'em-emoji' does not exist on type 'JSX.IntrinsicElements'.ts(2339) | |
*/ | |
// Define em-emoji web component inside React | |
// https://github.com/missive/emoji-mart#-emoji-component | |
interface EmEmojiProps { | |
id?: string | |
shortcodes?: string | |
native?: string | |
size?: string | |
fallback?: string | |
set?: 'native' | 'apple' | 'facebook' | 'google' | 'twitter' | |
skin?: 1 | 2 | 3 | 4 | 5 | 6 | |
} | |
declare global { | |
// eslint-disable-next-line @typescript-eslint/no-namespace | |
namespace JSX { | |
interface IntrinsicElements { | |
'em-emoji': EmEmojiProps | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment