1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

fix: loader improvements

This commit is contained in:
2023-08-01 18:59:45 +02:00
parent e51e3bdc19
commit d2578abeec
11 changed files with 217 additions and 207 deletions

View File

@ -0,0 +1,28 @@
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>
)
}