UNPKG

leumas-private-shared

Version:

Private React JSX Package For Leumas Shared Components, Headers, Footers, Asides, Login Pages, API Key Manager and much more. Styles and everything reusable to avoid DRY code across all of our subdomains

37 lines (31 loc) 765 B
import React from 'react'; import { styled, keyframes } from '@mui/system'; const twinkling = keyframes` 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } `; const Stars = styled('div')` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: transparent; z-index: -1; overflow: hidden; &:before { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; background: url('https://www.transparenttextures.com/patterns/stardust.png'); animation: ${twinkling} 5s linear infinite; } `; const StarryNightBackground = ({ children }) => { return <Stars>{children}</Stars>; }; export default StarryNightBackground;