| 2 | import { cn } from "../lib/utils"; |
| 3 | |
| 4 | export function ErrorState(props: { |
| 5 | readonly message: string; |
| 6 | readonly onRetry: () => void; |
| 7 | readonly className?: string; |
| 8 | }) { |
| 9 | return ( |
| 10 | <div |
| 11 | className={cn( |
| 12 | "flex items-center justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-4 py-3", |
| 13 | props.className, |
| 14 | )} |
| 15 | > |
| 16 | <p className="text-sm text-destructive">{props.message}</p> |
| 17 | <Button type="button" variant="outline" size="sm" onClick={props.onRetry}> |
| 18 | Retry |
| 19 | </Button> |
| 20 | </div> |
| 21 | ); |
| 22 | } |