Sheet, ErrorBanner, Skeleton and EmptyState (#36)
CI / ci (push) Successful in 1m30s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #36.
This commit is contained in:
2026-10-03 18:22:59 -04:00
committed by approver_agent
parent 02f1dd6491
commit 732aa92a8c
14 changed files with 729 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { ReactNode } from 'react'
import { Button } from './Button.tsx'
import { Card } from './Card.tsx'
import styles from './ErrorBanner.module.css'
export type ErrorBannerProps = {
// What went wrong, in the caller's words.
children: ReactNode
onRetry: () => void
retryLabel?: string
}
// Muted neutral-100 card with grape-700 text and a Retry button.
export function ErrorBanner({ children, onRetry, retryLabel = 'Retry' }: ErrorBannerProps) {
return (
<Card tone="muted" role="alert" className={styles.banner}>
<p className={styles.message}>{children}</p>
<Button onClick={onRetry}>{retryLabel}</Button>
</Card>
)
}