24 lines
384 B
TypeScript
Raw Normal View History

2022-03-13 14:40:38 +08:00
import { ReactNode } from 'react'
2022-05-29 17:53:27 +08:00
import { cx } from '@emotion/css'
2022-03-13 14:40:38 +08:00
const Skeleton = ({
children,
className,
}: {
children?: ReactNode
className?: string
}) => {
return (
<div
2022-05-12 02:45:43 +08:00
className={cx(
2022-03-13 14:40:38 +08:00
'relative animate-pulse bg-gray-100 text-transparent dark:bg-gray-800',
className
)}
>
{children}
</div>
)
}
export default Skeleton