Skip to content

Commit

Permalink
ensure props aligned (#3050)
Browse files Browse the repository at this point in the history
* ensure props aligned

* k

* k
  • Loading branch information
pablonyx authored Nov 5, 2024
1 parent dea7a8f commit b2c55eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion web/src/components/ErrorCallout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Callout } from "@/components/ui/callout";
import { FiAlertTriangle } from "react-icons/fi";

export function ErrorCallout({
errorTitle,
Expand All @@ -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}
Expand Down
8 changes: 5 additions & 3 deletions web/src/components/ui/callout.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit b2c55eb

Please sign in to comment.