hezarfen_frontend
Clone
https://git.tahinli.com/archive/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiB4e0a329Burak Boduroğlu2 months ago537 commits
| 1 | import { Show } from "solid-js"; |
| 2 | import { Illustration } from "@/components/ui/illustration"; |
| 3 | import { cn } from "@/lib/cn"; |
| 4 | import 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. */ |
| 8 | export 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 | } |