Support app.relay.emoji_confetti on jumbo emoji clicks with canvas physics, per-emoji particle profiles, and a fixed overlay that does not affect scroll. Also add a Vite playground for live component previews and theme hover preview.
25 lines
605 B
TypeScript
25 lines
605 B
TypeScript
import React from 'react';
|
|
import { EmojiConfettiBurst } from './types';
|
|
import { EmojiConfettiBurstCanvas } from './EmojiConfettiBurstCanvas';
|
|
|
|
type EmojiConfettiOverlayProps = {
|
|
bursts: EmojiConfettiBurst[];
|
|
onBurstComplete: (burstId: string) => void;
|
|
};
|
|
|
|
export function EmojiConfettiOverlay({ bursts, onBurstComplete }: EmojiConfettiOverlayProps) {
|
|
if (bursts.length === 0) return null;
|
|
|
|
return (
|
|
<>
|
|
{bursts.map((burst) => (
|
|
<EmojiConfettiBurstCanvas
|
|
key={burst.id}
|
|
burst={burst}
|
|
onComplete={onBurstComplete}
|
|
/>
|
|
))}
|
|
</>
|
|
);
|
|
}
|