mirror of
https://github.com/rustfs/console.git
synced 2026-08-29 03:52:28 +08:00
ca87e9e007
* feat: move status route and format repo * fix: resolve lint warnings * fix: load bucket usage asynchronously * fix: sign version config request * fix: show spinner for bucket usage loading * fix: prevent object list fetch loop * fix: dedupe list requests * feat: add sidebar version footer
35 lines
1002 B
TypeScript
35 lines
1002 B
TypeScript
"use client"
|
|
|
|
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
interface EmptyStateProps {
|
|
title?: string
|
|
description?: string
|
|
icon?: React.ReactNode
|
|
children?: React.ReactNode
|
|
className?: string
|
|
}
|
|
|
|
export function EmptyState({ title, description, icon, children, className }: EmptyStateProps) {
|
|
return (
|
|
<Empty className={cn("py-10", className)}>
|
|
<EmptyContent className="max-w-sm text-center">
|
|
<EmptyHeader>
|
|
{icon && (
|
|
<EmptyMedia
|
|
variant="icon"
|
|
className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-muted"
|
|
>
|
|
{icon}
|
|
</EmptyMedia>
|
|
)}
|
|
{title && <EmptyTitle>{title}</EmptyTitle>}
|
|
{description && <EmptyDescription>{description}</EmptyDescription>}
|
|
</EmptyHeader>
|
|
{children}
|
|
</EmptyContent>
|
|
</Empty>
|
|
)
|
|
}
|