mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-01 16:46:36 +08:00
43 lines
966 B
TypeScript
43 lines
966 B
TypeScript
import { Spinner } from "@/shadcn-bridge/heroui/spinner";
|
|
|
|
interface BaseStateProps {
|
|
message: string;
|
|
className?: string;
|
|
}
|
|
|
|
export const PageLoadingState = ({
|
|
message,
|
|
className = "h-64",
|
|
}: BaseStateProps) => {
|
|
return (
|
|
<div className={`flex items-center justify-center ${className}`}>
|
|
<div className="flex items-center gap-3">
|
|
<Spinner size="sm" />
|
|
<span className="text-default-600">{message}</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const PageEmptyState = ({
|
|
message,
|
|
className = "h-48",
|
|
}: BaseStateProps) => {
|
|
return (
|
|
<div className={`flex items-center justify-center ${className}`}>
|
|
<span className="text-default-500">{message}</span>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export const PageErrorState = ({
|
|
message,
|
|
className = "h-48",
|
|
}: BaseStateProps) => {
|
|
return (
|
|
<div className={`flex items-center justify-center ${className}`}>
|
|
<span className="text-danger">{message}</span>
|
|
</div>
|
|
);
|
|
};
|