Skip to content

Commit

Permalink
feat(emoji): allowing size as a prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoguzmana committed Aug 20, 2022
1 parent bf3c311 commit 3c74b12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Emoji.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
() =>
Expand Down

0 comments on commit 3c74b12

Please sign in to comment.