This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
Théo LUDWIG 33b57bf173
All checks were successful
Chromatic / chromatic (push) Successful in 4m47s
CI / ci (push) Successful in 3m50s
CI / commitlint (push) Successful in 18s
Release / release (push) Successful in 1m0s
refactor: components struture
2024-07-31 15:46:01 +02:00

33 lines
722 B
TypeScript

import { classNames } from "@repo/config-tailwind/classNames"
export interface SpinnerProps {
size?: number
className?: string
}
/**
* Spinner provide a visual cue that an action is processing.
* @param props
* @returns
*/
export const Spinner: React.FC<SpinnerProps> = (props) => {
const { size = 50, className } = props
return (
<div
style={{
width: size,
height: size,
}}
className={classNames(
"text-primary dark:text-primary-dark flex animate-spin rounded-full border-2 border-current border-t-transparent",
className,
)}
role="status"
aria-label="loading"
>
<span className="sr-only">Loading...</span>
</div>
)
}