This repository has been archived on 2024-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
react-component-form/example/components/design/Loader/Loader.tsx

34 lines
847 B
TypeScript
Raw Normal View History

2022-10-03 21:23:17 +02: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}>
<div
data-cy='progress-spinner'
className='relative my-0 mx-auto before:content-none before:block before:pt-[100%]'
style={{ width: `${width}px`, height: `${height}px` }}
>
2023-01-10 21:23:32 +01:00
<svg className={styles['progressSpinnerSvg']} viewBox='25 25 50 50'>
2022-10-03 21:23:17 +02:00
<circle
2023-01-10 21:23:32 +01:00
className={styles['progressSpinnerCircle']}
2022-10-03 21:23:17 +02:00
cx='50'
cy='50'
r='20'
fill='none'
strokeWidth='2'
strokeMiterlimit='10'
/>
</svg>
</div>
</div>
)
}