Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

fix: align button baseline and hover state in dark mode in toast (#83092)

Uladzimir Havenchyk1df1ca5f368d
diff --git a/frontend/src/metabase/admin/performance/hooks/useInvalidateTarget.tsx b/frontend/src/metabase/admin/performance/hooks/useInvalidateTarget.tsx
index 01b83eaf518..42fc6bf610c 100644
--- a/frontend/src/metabase/admin/performance/hooks/useInvalidateTarget.tsx
+++ b/frontend/src/metabase/admin/performance/hooks/useInvalidateTarget.tsx
@@ -36,7 +36,6 @@ export const useInvalidateTarget = (
icon: "warning",
message: e.data.message,
toastColor: "feedback-negative",
- dismissIconColor: "text-primary-inverse",
}),
);
}
diff --git a/frontend/src/metabase/common/components/UndoListing.tsx b/frontend/src/metabase/common/components/UndoListing.tsx
index cd35f282b4a..acdefc7c195 100644
--- a/frontend/src/metabase/common/components/UndoListing.tsx
+++ b/frontend/src/metabase/common/components/UndoListing.tsx
@@ -129,8 +129,8 @@ function UndoToast({
onMouseLeave={() => updateInteraction({ isHovered: false })}
onFocus={handleFocus}
onBlur={handleBlur}
- bg={dark ? "background_page-primary-inverse" : "background_page-primary"}
- c={dark ? "text-secondary-inverse" : "text-primary"}
+ bg={dark ? "tooltip-background" : "background_page-primary"}
+ c={dark ? "tooltip-text" : "text-primary"}
withBorder={!noBorder}
radius="sm"
p="lg"
@@ -167,7 +167,7 @@ function UndoToast({
<Icon
className={S.messageIcon}
name={undo.icon}
- c={undo.iconColor ?? "text-secondary-inverse"}
+ c={undo.iconColor ?? "tooltip-text"}
mr="sm"
flex="0 0 auto"
/>
@@ -184,7 +184,7 @@ function UndoToast({
{undo.actions && undo.actions.length > 0 && (
<Button
className={S.actionButton}
- variant="default"
+ variant={dark ? "on-dark-primary" : "default"}
size="sm"
onClick={onUndo}
>
@@ -194,7 +194,7 @@ function UndoToast({
{undo.extraAction && (
<Button
className={S.actionButton}
- variant="default"
+ variant={dark ? "on-dark-secondary" : "default"}
size="sm"
onClick={() => {
undo.extraAction?.action();
@@ -209,7 +209,7 @@ function UndoToast({
{undo.canDismiss && (
<Icon
className={S.dismissIcon}
- color={undo.dismissIconColor || "text-secondary-inverse"}
+ color={undo.dismissIconColor || "tooltip-text"}
name="close"
onClick={onDismiss}
ml="lg"
diff --git a/frontend/src/metabase/query_builder/components/QueryModals/QueryModals.tsx b/frontend/src/metabase/query_builder/components/QueryModals/QueryModals.tsx
index 744f63fb55c..a7cddf1b8b4 100644
--- a/frontend/src/metabase/query_builder/components/QueryModals/QueryModals.tsx
+++ b/frontend/src/metabase/query_builder/components/QueryModals/QueryModals.tsx
@@ -362,7 +362,9 @@ function getAddToDashboardToastProps(
onOpenModal: (modalType: QueryModalType) => void,
): ToastArgs {
return {
- message: () => <Text c="inherit" fw="bold" mr="2.5rem">{t`Saved`}</Text>,
+ message: () => (
+ <Text c="inherit" fw="bold" lh="inherit" mr="2.5rem">{t`Saved`}</Text>
+ ),
actionLabel: t`Add this to a dashboard`,
action: () => onOpenModal(MODAL_TYPES.ADD_TO_DASHBOARD),
};