react-rewards
react-rewards copied to clipboard
how to add custom emoji
Hello, thanks for the nice package. how to add custom emoji? it might be helpful add an example to the document.
i tried like below. is this the right way?
import { useReward } from 'react-rewards';
...
const { reward: confettiReward, isAnimating } = useReward(
"rewardId",
"emoji",
{
emoji: ["⚡️", "💥", "✨", "💫", "🌸", "🌟"],
}
);
...
<button
disabled={isConfettiAnimating}
onClick={() => {
confettiReward();
}}
>
<span id="confettiReward" />
🎉
</button>