From 4f76026c52107b2d024e331b703c157668fcca70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Dombya?= <135591453+hervedombya@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:12:54 +0200 Subject: [PATCH] minor fixes --- src/lib/components/toast/Toast.component.tsx | 8 ++++---- src/lib/components/toast/useMutationsHandler.ts | 8 ++++---- src/lib/style/theme.ts | 3 +++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/lib/components/toast/Toast.component.tsx b/src/lib/components/toast/Toast.component.tsx index 1b68f36262..bf292556da 100644 --- a/src/lib/components/toast/Toast.component.tsx +++ b/src/lib/components/toast/Toast.component.tsx @@ -44,11 +44,11 @@ const useGetRgbBackgroundColor = (status: string) => { const theme = useTheme(); switch (status) { case 'success': - return 'rgba(10, 173, 166, 0.4)'; + return `rgba(${theme.statusHealthyRGB}, 0.4)`; case 'error': - return 'rgba(232, 72, 85, 0.4)'; + return `rgba(${theme.statusCriticalRGB}, 0.4)`; case 'warning': - return 'rgba(248, 243, 43, 0.4)'; + return `rgba(${theme.statusWarningRGB}, 0.4)`; default: return theme.infoSecondary; } @@ -132,7 +132,7 @@ function Toast({ return (
= { +export type MutationConfig = { mutation: UseMutationResult; name: string; }; -type DescriptionBuilder = { +type DescriptionBuilder = { data?: Data; error?: unknown; name: string; }; -type MutationsHandlerProps = { +type MutationsHandlerProps = { mainMutation: MutationConfig; dependantMutations?: MutationConfig[]; messageDescriptionBuilder: ( @@ -24,7 +24,7 @@ type MutationsHandlerProps = { onMainMutationSuccess?: () => void; }; -export const useMutationsHandler = ({ +export const useMutationsHandler = ({ mainMutation, dependantMutations, messageDescriptionBuilder, diff --git a/src/lib/style/theme.ts b/src/lib/style/theme.ts index 90d54c36c8..598e711200 100644 --- a/src/lib/style/theme.ts +++ b/src/lib/style/theme.ts @@ -31,8 +31,11 @@ export const grayLightest = '#E9EBED'; export const defaultTheme = { darkRebrand: { statusHealthy: '#0AADA6', + statusHealthyRGB: '10,173,166', statusWarning: '#F8F32B', + statusWarningRGB: '248,243,43', statusCritical: '#E84855', + statusCriticalRGB: '232,72,85', selectedActive: '#037AFF', highlight: '#1A3C75', border: '#4A4A4A',