'use client'; import { forwardRef, HTMLAttributes, useId } from 'react'; export interface WarningTapeProps extends HTMLAttributes { /** The text to scroll */ children: string; /** Background color */ bgColor?: string; /** Text color */ textColor?: string; /** Scroll speed in seconds */ duration?: number; /** Rotation angle in degrees */ rotation?: number; /** Reverse scroll direction */ reverse?: boolean; } export const WarningTape = forwardRef( ( { children, bgColor, textColor, duration = 20, rotation = -1, reverse = false, className = '', style, ...props }, ref ) => { const id = useId(); // Repeat text for seamless scroll const repeatedText = `${children} • `.repeat(20); return ( <>
{repeatedText}
); } ); WarningTape.displayName = 'WarningTape'; export default WarningTape;