Skip to content

Commit

Permalink
Deprecate info/warning/error colors
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Jan 13, 2025
1 parent 0bd89dd commit ee4ed81
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 39 deletions.
6 changes: 3 additions & 3 deletions packages/keychain/src/components/ErrorAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export function ErrorAlert({
const styles = useMemo(() => {
switch (variant) {
case "info":
return { bg: "bg-info", text: "text-info-foreground" };
return { bg: "bg-[#95c1ea]", text: "text-[black]" };
case "warning":
return { bg: "bg-warning", text: "text-warning-foreground" };
return { bg: "bg-[#1f2320]", text: "text-[white]" };
case "error":
return { bg: "bg-error", text: "text-error-foreground" };
return { bg: "bg-[#f9b9b9]", text: "text-[black]" };
default:
return { bg: "bg-secondary", text: "text-secondary-foreground" };
}
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/CreateSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function CreateSession({

{!policies?.verified && (
<div
className="flex items-center p-3 mb-3 gap-5 border border-solid-primary rounded-md cursor-pointer border-error-icon text-error-icon"
className="flex items-center p-3 mb-3 gap-5 border border-solid-primary rounded-md cursor-pointer border-destructive text-destructive"
onClick={() => !isConnecting && setIsConsent(!isConsent)}
>
<Checkbox
Expand Down
9 changes: 3 additions & 6 deletions packages/ui-next/src/components/icons/error-alert-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ export function ErrorAlertIcon({
switch (variant) {
case "info":
return (
<InfoIcon size={size} className={cn("text-info-icon", className)} />
<InfoIcon size={size} className={cn("text-[#005299]", className)} />
);
case "warning":
return (
<WarningIcon
size={size}
className={cn("text-warning-icon", className)}
/>
<WarningIcon size={size} className={cn("text-[#fac400]", className)} />
);
case "error":
return (
<AlertIconRaw
size={size}
className={cn("text-error-icon", className)}
className={cn("text-destructive", className)}
/>
);
}
Expand Down
15 changes: 0 additions & 15 deletions packages/ui-next/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ export const cartridgeTWPreset: Partial<Config> = {
spacer: {
DEFAULT: "hsl(var(--spacer))",
},
info: {
DEFAULT: "hsl(var(--info))",
foreground: "hsl(var(--info-foreground))",
icon: "hsl(var(--info-icon))",
},
warning: {
DEFAULT: "hsl(var(--warning))",
foreground: "hsl(var(--warning-foreground))",
icon: "hsl(var(--warning-icon))",
},
error: {
DEFAULT: "hsl(var(--error))",
foreground: "hsl(var(--error-foreground))",
icon: "hsl(var(--error-icon))",
},
},
extend: {
fontFamily: {
Expand Down
17 changes: 3 additions & 14 deletions packages/ui-next/src/themes/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,14 @@
--accent: 207 15% 85%;
--accent-foreground: 132 6% 30%;

--destructive: 7 72% 65%;
--destructive-foreground: 7 72% 65%;
--destructive: 0 72% 65%;
--destructive-foreground: 0 72% 65%;

--border: 220 60% 99%;
--input: 210 2.48% 94.9%; /* bg.secondary */
--ring: 0 0% 0%;

--radius: 0.5rem;

--spacer: 0 0% 0%; /* solid-fills/spacer */

--info: 209 67% 75%;
--info-foreground: 135 8% 9%;
--info-icon: 208 100% 30%;
--warning: 135 6% 13%;
--warning-foreground: 0 0% 100%;
--warning-icon: 47 100% 49%;
--error: 0 84% 85%;
--error-foreground: 0 0% 0%;
--error-icon: 0 72% 65%;
--radius: 0.5rem;
}
}

0 comments on commit ee4ed81

Please sign in to comment.