import * as React from 'react'; export interface ParticleCSSProperties extends React.CSSProperties { '--particle-dir'?: number; '--particle-offset'?: number; '--rotation-dir'?: number; } export interface ParticleProps { style?: ParticleCSSProperties; size?: number; shape?: 'spark' | 'heart'; } const shapes = { heart: ( ), spark: ( ), } as const; const Particle = React.forwardRef( ({size = 20, shape = 'spark', style}, ref) => { return (
{shapes[shape]}
); } ); export default Particle;