This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/components/design/Loader/Loader.tsx

34 lines
852 B
TypeScript
Raw Permalink Normal View History

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