From 37b192216994dcace771b7583c188ad88bf124ec Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Sat, 5 Nov 2022 16:11:51 -0600 Subject: [PATCH] Fix CSS specificity, where canvas's solutionToolbarButton's background-color now takes precedence over EuiButton's primary styles --- .../public/components/solution_toolbar/items/button.tsx | 2 +- .../public/components/solution_toolbar/items/popover.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/presentation_util/public/components/solution_toolbar/items/button.tsx b/src/plugins/presentation_util/public/components/solution_toolbar/items/button.tsx index ee1bbd64b5f871..a0a868875382dd 100644 --- a/src/plugins/presentation_util/public/components/solution_toolbar/items/button.tsx +++ b/src/plugins/presentation_util/public/components/solution_toolbar/items/button.tsx @@ -24,7 +24,7 @@ export const SolutionToolbarButton = ({ label, primary, className, ...rest }: Pr {...rest} size="m" color={primary ? 'primary' : 'text'} - className={`solutionToolbarButton ${className}`} + className={`${primary ? '' : 'solutionToolbarButton'} ${className}`} fill={primary} > {label} diff --git a/src/plugins/presentation_util/public/components/solution_toolbar/items/popover.tsx b/src/plugins/presentation_util/public/components/solution_toolbar/items/popover.tsx index fea6bf41a16018..6f968d940b12de 100644 --- a/src/plugins/presentation_util/public/components/solution_toolbar/items/popover.tsx +++ b/src/plugins/presentation_util/public/components/solution_toolbar/items/popover.tsx @@ -7,8 +7,7 @@ */ import React, { useState } from 'react'; -import { EuiPopover } from '@elastic/eui'; -import { Props as EuiPopoverProps } from '@elastic/eui/src/components/popover/popover'; +import { EuiPopover, EuiPopoverProps } from '@elastic/eui'; import { SolutionToolbarButton, Props as ButtonProps } from './button';