nyipyatki/frontend/src/components/Snowflakes.tsx
2025-11-02 00:21:06 +02:00

27 lines
794 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;