1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 22:09:07 +01:00
.profile/components/design/Loader.tsx

29 lines
623 B
TypeScript
Raw Normal View History

import classNames from "clsx"
2023-08-01 18:59:45 +02:00
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,
2023-08-01 18:59:45 +02:00
}}
className={classNames(
"inline-block animate-spin rounded-full border-[3px] border-current border-t-transparent text-yellow dark:text-yellow-dark",
className,
2023-08-01 18:59:45 +02:00
)}
role="status"
aria-label="loading"
2023-08-01 18:59:45 +02:00
>
<span className="sr-only">Loading...</span>
2023-08-01 18:59:45 +02:00
</div>
)
}