2
2
mirror of https://github.com/Thream/website.git synced 2024-07-21 09:28:32 +02:00
website/components/design/Loader/Loader.tsx

34 lines
847 B
TypeScript
Raw Normal View History

2022-12-13 22:31:32 +01:00
import styles from './Loader.module.css'
export interface LoaderProps {
width?: number
height?: number
className?: string
}
export const Loader: React.FC<LoaderProps> = (props) => {
const { width = 50, height = 50 } = props
return (
<div className={props.className}>
2022-12-13 22:31:32 +01:00
<div
data-cy='progress-spinner'
className='relative my-0 mx-auto before:block before:pt-[100%] before:content-none'
style={{ width: `${width}px`, height: `${height}px` }}
>
2023-01-11 17:39:09 +01:00
<svg className={styles['progressSpinnerSvg']} viewBox='25 25 50 50'>
<circle
2023-01-11 17:39:09 +01:00
className={styles['progressSpinnerCircle']}
cx='50'
cy='50'
r='20'
fill='none'
strokeWidth='2'
strokeMiterlimit='10'
/>
</svg>
</div>
</div>
)
}