16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
import { memo } from 'react';
|
|
|
|
function Loader({ width = 40 }: { width?: number }) {
|
|
return (
|
|
<div className="flex items-center justify-center" style={{ width }}>
|
|
<div
|
|
className="animate-spin rounded-full border-4 border-gray-200 border-t-gray-800"
|
|
style={{ width, height: width }}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
Loader.displayName = 'Loader';
|
|
export default memo(Loader);
|