next-enterprise/components/StarBackground/StarBackground.tsx
2024-04-05 08:35:36 +00:00

20 lines
528 B
TypeScript

import React from 'react';
import Particles from 'react-tsparticles';
import particlesConfig from "./particles.config.js";
import { loadFull } from "tsparticles";
const StarBackground: React.FC = () => {
async function loadParticles(main: any){
await loadFull(main)
}
return (
<Particles
id="star-background"
init={loadParticles}
options={particlesConfig}
style={{ position: 'fixed', top: 0, left: 0, width: '100%', height: '100%' }}
/>
);
};
export default StarBackground;