23 lines
409 B
TypeScript
23 lines
409 B
TypeScript
|
|
import { memo } from 'react';
|
||
|
|
|
||
|
|
export const Skeleton = memo(function Skeleton({
|
||
|
|
className,
|
||
|
|
rounded,
|
||
|
|
}: {
|
||
|
|
className?: string;
|
||
|
|
rounded?: boolean;
|
||
|
|
}): JSX.Element {
|
||
|
|
return (
|
||
|
|
<div
|
||
|
|
data-testid="skeleton"
|
||
|
|
className={[
|
||
|
|
'animate-pulse bg-bg-hover',
|
||
|
|
rounded ? 'rounded-full' : 'rounded',
|
||
|
|
className,
|
||
|
|
]
|
||
|
|
.filter(Boolean)
|
||
|
|
.join(' ')}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
});
|