From 3c74b12d275b4a79f4e418b09bbcb25ca87fff4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateo=20Guzm=C3=A1n?= Date: Sat, 20 Aug 2022 09:41:18 +0200 Subject: [PATCH] feat(emoji): allowing size as a prop --- src/components/Emoji.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Emoji.tsx b/src/components/Emoji.tsx index 601808a..27c2dda 100644 --- a/src/components/Emoji.tsx +++ b/src/components/Emoji.tsx @@ -8,11 +8,12 @@ interface EmojiProps { y: number; autoplay?: boolean; emoji: string; + size?: number; } -function Emoji({ x, y, autoplay = true, emoji }: EmojiProps) { +function Emoji({ x, y, autoplay = true, emoji, size = 30 }: EmojiProps) { const opacity = useValue(1); - const font = useFont(require('../fonts/emojis.ttf'), 40); + const font = useFont(require('../fonts/emojis.ttf'), size); const changeOpacity = useCallback( () =>