mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-12-08 00:44:30 +01:00
29 lines
621 B
TypeScript
29 lines
621 B
TypeScript
|
import classNames from 'clsx'
|
||
|
|
||
|
export interface LoaderProps {
|
||
|
width?: number
|
||
|
height?: number
|
||
|
className?: string
|
||
|
}
|
||
|
|
||
|
export const Loader = (props: LoaderProps): JSX.Element => {
|
||
|
const { width = 50, height = 50, className } = props
|
||
|
|
||
|
return (
|
||
|
<div
|
||
|
style={{
|
||
|
width,
|
||
|
height
|
||
|
}}
|
||
|
className={classNames(
|
||
|
'animate-spin inline-block border-[3px] border-current border-t-transparent text-yellow dark:text-yellow-dark rounded-full',
|
||
|
className
|
||
|
)}
|
||
|
role='status'
|
||
|
aria-label='loading'
|
||
|
>
|
||
|
<span className='sr-only'>Loading...</span>
|
||
|
</div>
|
||
|
)
|
||
|
}
|