Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
EuiPanel,
EuiButtonIcon,
useEuiTheme,
useEuiBackgroundColor,
EuiIcon,
EuiText,
EuiTabs,
Expand Down Expand Up @@ -110,9 +109,9 @@ export const RuleActionsItem = (props: RuleActionsItemProps) => {
} = useRuleFormState();

const [tab, setTab] = useState<string>(MESSAGES_TAB);
const subdued = useEuiBackgroundColor('subdued');
const plain = useEuiBackgroundColor('plain');
const { euiTheme } = useEuiTheme();
const subdued = euiTheme.colors.lightestShade;
const plain = euiTheme.colors.backgroundBasePlain;

const [availableActionVariables, setAvailableActionVariables] = useState<ActionVariable[]>(() => {
if (!selectedRuleType.actionVariables) {
Expand Down Expand Up @@ -692,7 +691,7 @@ export const RuleActionsItem = (props: RuleActionsItemProps) => {
}
buttonContentClassName="eui-fullWidth"
buttonContent={
<EuiPanel color="subdued" paddingSize="m">
<EuiPanel color={subdued} paddingSize="m">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why do we need to override the default subdued panel here? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is still WIP, i ll update it

<EuiFlexGroup alignItems="center" responsive={false}>
{accordionIcon}
{connectorTitle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ export const RuleActionsSystemActionsItem = (props: RuleActionsSystemActionsItem
>({});
const [warning, setWarning] = useState<string | null>(null);

const subdued = useEuiBackgroundColor('subdued');
const { euiTheme } = useEuiTheme();
const subdued = euiTheme.colors.lightestShade;

const dispatch = useRuleFormDispatch();
const actionTypeModel = actionTypeRegistry.get(action.actionTypeId);
Expand Down Expand Up @@ -267,7 +267,7 @@ export const RuleActionsSystemActionsItem = (props: RuleActionsSystemActionsItem
buttonContent={
<EuiPanel
data-test-subj="ruleActionsSystemActionsItemAccordionButton"
color="subdued"
color={subdued}
paddingSize="m"
>
<EuiFlexGroup alignItems="center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React from 'react';
import { useEuiBackgroundColorCSS, EuiPageTemplate } from '@elastic/eui';
import { EuiPageTemplate } from '@elastic/eui';

interface RuleFormErrorPromptWrapperProps {
hasBorder?: boolean;
Expand All @@ -18,7 +18,9 @@ interface RuleFormErrorPromptWrapperProps {
export const RuleFormErrorPromptWrapper: React.FC<
React.PropsWithChildren<RuleFormErrorPromptWrapperProps>
> = ({ children, hasBorder, hasShadow }) => {
const styles = useEuiBackgroundColorCSS().transparent;
const styles = {
backgroundColor: 'transparent',
};
return (
<EuiPageTemplate offset={0} css={styles}>
<EuiPageTemplate.EmptyPrompt paddingSize="none" hasBorder={hasBorder} hasShadow={hasShadow}>
Expand Down
5 changes: 3 additions & 2 deletions packages/response-ops/rule_form/src/rule_page/rule_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
EuiSpacer,
EuiSteps,
EuiStepsProps,
useEuiBackgroundColorCSS,
} from '@elastic/eui';
import { checkActionFormActionTypeEnabled } from '@kbn/alerts-ui-shared';
import React, { useCallback, useMemo, useState } from 'react';
Expand Down Expand Up @@ -70,7 +69,9 @@ export const RulePage = (props: RulePageProps) => {

const canReadConnectors = !!application.capabilities.actions?.show;

const styles = useEuiBackgroundColorCSS().transparent;
const styles = {
backgroundColor: 'transparent',
};

const onSaveInternal = useCallback(() => {
onSave({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ export const StreamingResponse = ({
id={`streamingResponse`}
css={css`
.euiButtonIcon {
color: ${euiTheme.colors.primaryText};
color: ${euiTheme.colors.textPrimary};
}
`}
buttonContent={
<EuiFlexGroup direction="row" alignItems="center">
<EuiFlexItem grow>
<EuiText size="m" color={euiTheme.colors.primaryText}>
<EuiText size="m" color={euiTheme.colors.textPrimary}>
<strong>
{i18n.translate(
'genAiStreamingResponseExample.app.component.streamingResponseTitle',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { useCasesContext } from '../cases_context/use_cases_context';
const getMarkdownContainerCss = (euiTheme: EuiThemeComputed<{}>) => css`
max-height: 150px;
overflow-y: auto;
color: ${euiTheme.colors.subduedText};
color: ${euiTheme.colors.textSubdued};
`;

const getTruncateCompCss = css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
EuiHighlight,
EuiOutsideClickDetector,
useEuiTheme,
useEuiBackgroundColor,
} from '@elastic/eui';
import { ActionVariable } from '@kbn/alerting-plugin/common';
import { AddMessageVariables } from '@kbn/alerts-ui-shared';
Expand Down Expand Up @@ -48,7 +47,7 @@ export const TextAreaWithAutocomplete: React.FunctionComponent<TextAreaWithAutoc
paramsProperty,
}) => {
const { euiTheme } = useEuiTheme();
const backgroundColor = useEuiBackgroundColor('plain');
const backgroundColor = euiTheme.colors.backgroundBasePlain;

const textAreaRef = React.useRef<HTMLTextAreaElement | null>(null);
const selectableRef = React.useRef<EuiSelectable | null>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const AlertCounts = ({ activeAlertCount, recoveredAlertCount, handleClick
<AlertItem
label={ACTIVE_NOW_LABEL}
count={activeAlertCount}
color={activeAlertCount > 0 ? euiTheme.colors.dangerText : euiTheme.colors.textSuccess}
color={activeAlertCount > 0 ? euiTheme.colors.textDanger : euiTheme.colors.textSuccess}
alertType={ALERT_STATUS_ACTIVE}
handleClick={handleClick}
showWarningIcon={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const RuleExecutionSummaryAndChart = (props: RuleExecutionSummaryAndChart
</EuiFlexItem>
)}
<EuiFlexItem grow={false} data-test-subj="ruleEventLogListAvgDuration">
<EuiText size="m" color={euiTheme.colors.text}>
<EuiText size="m" color={euiTheme.colors.textParagraph}>
<strong>
{formatMillisForDisplay(computedRuleSummary.executionDuration.average)}
</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ export const BaseSnoozePanel: React.FunctionComponent<BaseSnoozePanelProps> = ({
height: '36px',
// Replicate euiPanel--accent vs euiPanel--subdued
// Applying these classNames by themselves doesn't work due to a CSS-in-JS issue with EuiPanel
color: isActive ? '#a8376a' : euiTheme.colors.subduedText,
color: isActive
? euiTheme.colors.textAccent
: euiTheme.colors.textSubdued,
backgroundColor: isActive ? 'rgba(240,78,152,0.2)' : euiTheme.colors.body,
}}
className="euiButton euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--noBorder"
Expand Down