Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
import { cn } from "@rallly/ui";
export function EmptyState({
children,
className,
}: {
children?: React.ReactNode;
className?: string;
}) {
return (
<div
className={cn(
"flex flex-col items-center justify-center py-16 text-center",
className,
)}
>
{children}
</div>
);
}
export function EmptyStateIcon({ children }: { children: React.ReactNode }) {
return (
<div className="relative mb-4 inline-block">
<div className="absolute top-0 right-0 bottom-2 -left-1.5 origin-bottom -rotate-12 scale-95 rounded-xl bg-white opacity-75 shadow-xs ring-1 ring-button-outline ring-inset dark:bg-card" />
<div className="absolute top-0 -right-1.5 bottom-2 left-0 origin-bottom rotate-12 scale-95 rounded-xl bg-white opacity-75 shadow-xs ring-1 ring-button-outline ring-inset dark:bg-card" />
<div className="relative inline-flex rounded-xl bg-white p-3 shadow-xs ring-1 ring-button-outline ring-inset dark:bg-card [&_svg]:size-5 [&_svg]:shrink-0 [&_svg]:text-muted-foreground">
{children}
</div>
</div>
);
}
export function EmptyStateTitle({
as: Component = "p",
children,
}: {
as?: "p" | "h1" | "h2";
children: React.ReactNode;
}) {
return <Component className="font-medium text-base">{children}</Component>;
}
export function EmptyStateDescription({
children,
}: {
children: React.ReactNode;
}) {
return (
<p className="mt-2 max-w-md text-pretty text-muted-foreground text-sm leading-relaxed">
{children}
</p>
);
}
export function EmptyStateFooter({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) {
return <div className={cn("mt-6", className)}>{children}</div>;
}