Skip to content

Commit b2c55eb

Browse files
authored
ensure props aligned (#3050)
* ensure props aligned * k * k
1 parent dea7a8f commit b2c55eb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

web/src/components/ErrorCallout.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Callout } from "@/components/ui/callout";
2+
import { FiAlertTriangle } from "react-icons/fi";
23

34
export function ErrorCallout({
45
errorTitle,
@@ -12,7 +13,7 @@ export function ErrorCallout({
1213
<Callout
1314
className="mt-4"
1415
title={errorTitle || "Page not found"}
15-
icon="alert"
16+
icon={<FiAlertTriangle className="text-red-500 h-5 w-5" />}
1617
type="danger"
1718
>
1819
{errorMsg}

web/src/components/ui/callout.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { cn } from "@/lib/utils";
22

33
interface CalloutProps {
4-
icon?: string;
4+
icon?: React.ReactNode;
55
children?: React.ReactNode;
66
type?: "default" | "warning" | "danger" | "notice";
77
className?: string;
@@ -29,8 +29,10 @@ export function Callout({
2929
{...props}
3030
>
3131
{icon && <span className="mr-4 text-2xl">{icon}</span>}
32-
<div>
33-
{title && <div className="font-medium mb-1">{title}</div>}
32+
<div className="flex-1">
33+
{title && (
34+
<div className="font-medium mb-1 flex items-center">{title}</div>
35+
)}
3436
{children}
3537
</div>
3638
</div>

0 commit comments

Comments
 (0)