27 lines
794 B
TypeScript
27 lines
794 B
TypeScript
import React from 'react';
|
||
import './Snowflakes.css';
|
||
|
||
const Snowflakes: React.FC = () => {
|
||
// Adjust the number of snowflakes as needed
|
||
const snowflakeCount = Array.from({ length: 50 });
|
||
|
||
return (
|
||
<div className="snowflakes">
|
||
{snowflakeCount.map((_, index) => (
|
||
<div
|
||
key={index}
|
||
className="snowflake"
|
||
style={{
|
||
left: `${Math.random() * 100}vw`, // Random position across the full width
|
||
animationDuration: `${Math.random() * 3 + 2}s`, // Random fall duration between 2s and 5s
|
||
}}
|
||
>
|
||
❄️
|
||
</div>
|
||
))}
|
||
</div>
|
||
);
|
||
};
|
||
|
||
export default Snowflakes;
|