'use client'; import { forwardRef, HTMLAttributes } from 'react'; import styles from './warning-tape.module.css'; 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 ) => { // Repeat text for seamless scroll const repeatedText = `${children} • `.repeat(20); return (
{repeatedText}
); } ); WarningTape.displayName = 'WarningTape'; export default WarningTape;