-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
414ddaf
commit 3106e80
Showing
5 changed files
with
64 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/ui-next/src/components/icons/error-alert-icon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { cn } from "@/utils"; | ||
import { InfoIcon, WarningIcon, AlertIcon as AlertIconRaw } from "./utility"; | ||
|
||
export function ErrorAlertIcon({ | ||
variant, | ||
size = "default", | ||
className, | ||
}: { | ||
variant: "info" | "warning" | "error"; | ||
size?: "xs" | "default"; | ||
className?: string; | ||
}) { | ||
switch (variant) { | ||
case "info": | ||
return ( | ||
<InfoIcon | ||
size={size} | ||
className={cn("text-info-foreground", className)} | ||
/> | ||
); | ||
case "warning": | ||
return ( | ||
<WarningIcon | ||
size={size} | ||
className={cn("text-warning-foreground", className)} | ||
/> | ||
); | ||
case "error": | ||
return ( | ||
<AlertIconRaw | ||
size={size} | ||
className={cn("text-error-foreground", className)} | ||
/> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters