refactor: unify public state panels
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
const { title, description, actionHref, actionLabel, tone = "empty", compact = false, contained = true } = Astro.props as { title: string; description?: string; actionHref?: string; actionLabel?: string; tone?: "empty" | "error" | "unavailable"; compact?: boolean; contained?: boolean };
|
||||
---
|
||||
<div class:list={["state", { "content-grid": contained, "compact-state": compact, "error-state": tone === "error", "unavailable-state": tone === "unavailable" }]} role={tone === "empty" ? "status" : "alert"}>
|
||||
<h2>{title}</h2>
|
||||
{description && <p>{description}</p>}
|
||||
{actionHref && actionLabel && <a href={actionHref}>{actionLabel}</a>}
|
||||
</div>
|
||||
Reference in New Issue
Block a user