From 8ae135a9b5192ca85b64cedf8ba80f9a7e471aad Mon Sep 17 00:00:00 2001 From: JunichiSugiura Date: Fri, 17 Jan 2025 13:18:33 +0900 Subject: [PATCH] Reorganize destructive colors --- .../keychain/src/components/ErrorAlert.tsx | 2 +- .../src/components/connect/CreateSession.tsx | 2 +- .../connect/create/CreateController.tsx | 2 +- .../components/connect/create/StatusTray.tsx | 2 +- .../src/components/settings/Delegate.tsx | 2 +- .../src/components/settings/Recovery.tsx | 2 +- .../inventory/collection/send/index.tsx | 8 ++-- .../components/inventory/token/send/index.tsx | 8 ++-- .../src/components/icons/error-alert-icon.tsx | 2 +- .../ui-next/src/components/icons/utils.tsx | 2 +- .../src/components/primitives/alert.tsx | 2 +- .../src/components/primitives/badge.tsx | 2 +- .../src/components/primitives/button.tsx | 2 +- .../src/components/primitives/form.tsx | 5 +- .../src/components/primitives/toast.tsx | 4 +- packages/ui-next/src/preset.ts | 1 + .../ui-next/src/stories/colors.stories.tsx | 47 +++++++------------ packages/ui-next/src/themes/default.css | 3 +- 18 files changed, 44 insertions(+), 54 deletions(-) diff --git a/packages/keychain/src/components/ErrorAlert.tsx b/packages/keychain/src/components/ErrorAlert.tsx index 3eeccfb43..459f4730c 100644 --- a/packages/keychain/src/components/ErrorAlert.tsx +++ b/packages/keychain/src/components/ErrorAlert.tsx @@ -58,7 +58,7 @@ export function ErrorAlert({ case "warning": return { bg: "bg-[#1f2320]", text: "text-[white]" }; case "error": - return { bg: "bg-[#f9b9b9]", text: "text-[black]" }; + return { bg: "bg-destructive", text: "text-[black]" }; default: return { bg: "bg-background-100", text: "text-foreground" }; } diff --git a/packages/keychain/src/components/connect/CreateSession.tsx b/packages/keychain/src/components/connect/CreateSession.tsx index 97a08c67c..38f3de93f 100644 --- a/packages/keychain/src/components/connect/CreateSession.tsx +++ b/packages/keychain/src/components/connect/CreateSession.tsx @@ -159,7 +159,7 @@ export function CreateSession({ {!policies?.verified && (
!isConnecting && setIsConsent(!isConsent)} >
diff --git a/packages/keychain/src/components/connect/create/StatusTray.tsx b/packages/keychain/src/components/connect/create/StatusTray.tsx index c015538f7..7ebec46b9 100644 --- a/packages/keychain/src/components/connect/create/StatusTray.tsx +++ b/packages/keychain/src/components/connect/create/StatusTray.tsx @@ -30,7 +30,7 @@ export function StatusTray({ username, validation, error }: StatusTrayProps) {
void }) { onChange={(e) => setDelegateAddress(e.target.value)} /> {!isValid && delegateAddress !== "" && ( -
+
Invalid address!
diff --git a/packages/keychain/src/components/settings/Recovery.tsx b/packages/keychain/src/components/settings/Recovery.tsx index eaf621c30..6f07d6ea1 100644 --- a/packages/keychain/src/components/settings/Recovery.tsx +++ b/packages/keychain/src/components/settings/Recovery.tsx @@ -51,7 +51,7 @@ export function Recovery({ onBack }: { onBack: () => void }) { onChange={(e) => setExternalOwnerAddress(e.target.value)} /> {!isValid && externalOwnerAddress !== "" && ( -
+
Invalid address!
diff --git a/packages/profile/src/components/inventory/collection/send/index.tsx b/packages/profile/src/components/inventory/collection/send/index.tsx index e6a8c726f..935574750 100644 --- a/packages/profile/src/components/inventory/collection/send/index.tsx +++ b/packages/profile/src/components/inventory/collection/send/index.tsx @@ -166,18 +166,18 @@ const Warning = ({ return (
setValidated(!validated)} > {validated && ( - + )} {!validated && ( - + )} -

{warning}

+

{warning}

); }; diff --git a/packages/profile/src/components/inventory/token/send/index.tsx b/packages/profile/src/components/inventory/token/send/index.tsx index c2a04e77b..3f3488c6f 100644 --- a/packages/profile/src/components/inventory/token/send/index.tsx +++ b/packages/profile/src/components/inventory/token/send/index.tsx @@ -97,18 +97,18 @@ export function SendToken() {
setValidated(!validated)} > {validated && ( - + )} {!validated && ( - + )} -

{warning}

+

{warning}