import type { ElementRef } from '@teact'; import { memo, type TeactNode, useRef } from '@teact'; import buildClassName from '../../../util/buildClassName'; import buildStyle from '../../../util/buildStyle'; import Sparkles from '../Sparkles'; import styles from './GiftEffectWrapper.module.scss'; type OwnProps = { children: TeactNode; ref?: ElementRef; className?: string; style?: string; withSparkles?: boolean; sparklesClassName?: string; sparklesColor?: string; glowColor?: string; onClick?: NoneToVoidFunction; }; const GiftEffectWrapper = ({ children, ref, className, style, withSparkles, sparklesClassName, sparklesColor, glowColor, onClick, }: OwnProps) => { let containerRef = useRef(); if (ref) { containerRef = ref; } return (
{withSparkles && ( )} {children}
); }; export default memo(GiftEffectWrapper);