Skip to content

Commit 681b226

Browse files
authored
Create ShinyText.tsx
1 parent c4de80f commit 681b226

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

components/ShinyText.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import './ShinyText.css';
2+
3+
interface ShinyTextProps {
4+
text: string;
5+
disabled?: boolean;
6+
speed?: number;
7+
className?: string;
8+
}
9+
10+
const ShinyText = ({ text, disabled = false, speed = 5, className = '' }: ShinyTextProps) => {
11+
const animationDuration = `${speed}s`;
12+
13+
return (
14+
<div
15+
className={`shiny-text ${disabled ? 'disabled' : ''} ${className}`}
16+
style={{ animationDuration }}
17+
>
18+
{text}
19+
</div>
20+
);
21+
};
22+
23+
export default ShinyText;

0 commit comments

Comments
 (0)