EditorMenuListSkeleton.tsx 754 B

12345678910111213141516171819202122232425
  1. import { memo } from 'react'
  2. import { Skeleton } from 'ui'
  3. const EditorMenuListSkeleton = memo(function EditorMenuListSkeleton() {
  4. const items = [
  5. { width: 'w-40', opacity: 'opacity-100' },
  6. { width: 'w-32', opacity: 'opacity-100' },
  7. { width: 'w-20', opacity: 'opacity-75' },
  8. { width: 'w-40', opacity: 'opacity-50' },
  9. { width: 'w-20', opacity: 'opacity-25' },
  10. ]
  11. return (
  12. <div className="px-4 flex flex-col gap-0">
  13. {items.map((item, index) => (
  14. <div key={index} className={`flex flex-row h-6 items-center gap-3 ${item.opacity}`}>
  15. <Skeleton className="h-4 w-5" />
  16. <Skeleton className={`h-4 ${item.width}`} />
  17. </div>
  18. ))}
  19. </div>
  20. )
  21. })
  22. export default EditorMenuListSkeleton