|
1 |
| -import { clsxm } from '~/utils/helper' |
2 |
| - |
3 |
| -export const CommentSkeleton: Component = ({ className }) => { |
| 1 | +const CommentSkeletonSingle = () => { |
4 | 2 | return (
|
5 |
| - <div className={clsxm('flex animate-pulse flex-col gap-3', className)}> |
6 |
| - <div className="h-6 w-full rounded-lg bg-gray-200 dark:bg-zinc-800/80" /> |
7 |
| - <div className="h-6 w-full rounded-lg bg-gray-200 dark:bg-zinc-800/80" /> |
8 |
| - <div className="h-6 w-full rounded-lg bg-gray-200 dark:bg-zinc-800/80" /> |
9 |
| - <div className="h-6 w-full rounded-lg bg-gray-200 dark:bg-zinc-800/80" /> |
| 3 | + <li className="relative animate-pulse list-none"> |
| 4 | + <div className="group flex w-full items-stretch gap-2"> |
| 5 | + <div className="flex w-9 shrink-0 items-end"> |
| 6 | + <div className="h-9 w-9 rounded-full bg-gray-300 dark:bg-neutral-600" /> |
| 7 | + </div> |
| 8 | + |
| 9 | + <div className="flex w-full min-w-0 flex-1 flex-col items-start"> |
| 10 | + <span className="relative mb-2 flex w-full min-w-0 items-center justify-center gap-2"> |
| 11 | + <span className="flex flex-grow items-center gap-2"> |
| 12 | + <span className="ml-2 h-4 w-20 bg-gray-300 dark:bg-neutral-600" /> |
| 13 | + <span className="flex select-none items-center space-x-2"> |
| 14 | + <span className="inline-flex h-4 w-20 bg-gray-300 text-[10px] font-medium opacity-40 dark:bg-neutral-600" /> |
| 15 | + <span className="h-4 w-20 bg-gray-300 text-[10px] opacity-30 dark:bg-neutral-600" /> |
| 16 | + </span> |
| 17 | + </span> |
| 18 | + </span> |
| 19 | + |
| 20 | + <div className="relative flex w-full flex-col gap-2"> |
| 21 | + <div className="relative ml-2 inline-block h-4 w-[calc(100%-3rem)] rounded-xl bg-gray-300 px-2 py-1 dark:bg-neutral-600" /> |
| 22 | + <div className="relative ml-2 inline-block h-4 w-[120px] rounded-xl bg-gray-300 px-2 py-1 dark:bg-neutral-600" /> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + |
10 | 27 | <span className="sr-only">Loading...</span>
|
| 28 | + </li> |
| 29 | + ) |
| 30 | +} |
| 31 | +export const CommentSkeleton: Component = () => { |
| 32 | + return ( |
| 33 | + <div className="flex flex-col space-y-4"> |
| 34 | + <CommentSkeletonSingle /> |
| 35 | + <CommentSkeletonSingle /> |
| 36 | + <CommentSkeletonSingle /> |
| 37 | + <CommentSkeletonSingle /> |
11 | 38 | </div>
|
12 | 39 | )
|
13 | 40 | }
|
0 commit comments