forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB4e0a329Burak Boduroğlu2 months ago537 commits

empty-inline.tsx25 lines, 902 bytesHistoryRawDownload
1import { Show } from "solid-js";
2import { Illustration } from "@/components/ui/illustration";
3import { cn } from "@/lib/cn";
4import type { IllustrationName } from "@/lib/illustrations";
5
6/** Compact empty state for cards, charts and short lists: a small scene plus
7 * one or two lines. The full-panel version is EmptyState. */
8export function EmptyInline(props: {
9 title: string;
10 hint?: string;
11 illustration?: IllustrationName;
12 class?: string;
13}) {
14 return (
15 <div class={cn("flex flex-col items-center justify-center gap-2 px-4 py-5 text-center", props.class)}>
16 <Illustration name={props.illustration ?? "empty"} class="h-16 w-24" />
17 <div>
18 <p class="text-xs font-semibold text-foreground/80">{props.title}</p>
19 <Show when={props.hint}>
20 <p class="mt-0.5 text-[11px] text-muted-foreground">{props.hint}</p>
21 </Show>
22 </div>
23 </div>
24 );
25}