ensure props aligned (#3050)

* ensure props aligned

* k

* k
This commit is contained in:
pablodanswer 2024-11-05 08:49:04 -08:00 committed by GitHub
parent dea7a8f697
commit b2c55ebd71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import { Callout } from "@/components/ui/callout";
import { FiAlertTriangle } from "react-icons/fi";
export function ErrorCallout({
errorTitle,
@ -12,7 +13,7 @@ export function ErrorCallout({
<Callout
className="mt-4"
title={errorTitle || "Page not found"}
icon="alert"
icon={<FiAlertTriangle className="text-red-500 h-5 w-5" />}
type="danger"
>
{errorMsg}

View File

@ -1,7 +1,7 @@
import { cn } from "@/lib/utils";
interface CalloutProps {
icon?: string;
icon?: React.ReactNode;
children?: React.ReactNode;
type?: "default" | "warning" | "danger" | "notice";
className?: string;
@ -29,8 +29,10 @@ export function Callout({
{...props}
>
{icon && <span className="mr-4 text-2xl">{icon}</span>}
<div>
{title && <div className="font-medium mb-1">{title}</div>}
<div className="flex-1">
{title && (
<div className="font-medium mb-1 flex items-center">{title}</div>
)}
{children}
</div>
</div>