diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-09-23 13:14:11 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-09-23 13:14:11 +0300 |
commit | 4df5503f3e06761a7096324f8e093ab4c1afefa7 (patch) | |
tree | 551dd6d3cbaab637d5b777615987657c02d8b9a2 /src/Emoji.tsx | |
parent | 2a287f317a51f5f02b643af0acf2733cadbb8081 (diff) | |
download | benzin-next-4df5503f3e06761a7096324f8e093ab4c1afefa7.tar.gz |
feat: add emoji plugin
Diffstat (limited to 'src/Emoji.tsx')
-rw-r--r-- | src/Emoji.tsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Emoji.tsx b/src/Emoji.tsx new file mode 100644 index 0000000..b928087 --- /dev/null +++ b/src/Emoji.tsx @@ -0,0 +1,19 @@ +import { FC } from 'react'; +import Image from 'next/future/image'; + +interface Props { + children: string[]; +} + +const Emoji: FC<Props> = ({ children }) => { + const src = children[0]; + return ( + <Image + src={`/emoji/${src}`} + width={16} + alt={`${src}-emoji`} + /> + ); +} + +export default Emoji; |