From 061e8a4610f3c7aee0a84e98d41fce54a58248c3 Mon Sep 17 00:00:00 2001 From: Matthew Kime Date: Wed, 1 Jan 2025 21:59:08 -0600 Subject: [PATCH] borealis updates --- .../reindex/flyout/_step_progress.scss | 15 -------- .../reindex/flyout/step_progress.tsx | 36 ++++++++++++++++--- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/_step_progress.scss b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/_step_progress.scss index faed0a83f1244..6d86f652e7252 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/_step_progress.scss +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/_step_progress.scss @@ -11,25 +11,10 @@ margin-right: $euiSizeM; } -$stepStatusToCallOutColor: ( - failed: $euiColorDanger, - complete: $euiColorSuccess, - paused: $euiColorWarning, - cancelled: $euiColorWarning, -); - .upgStepProgress__status--circle { text-align: center; border-radius: $euiSizeM; line-height: $euiSize - 2px; - - @each $status, $callOutColor in $stepStatusToCallOutColor { - &-#{$status} { - $statusBg: tintOrShade($callOutColor, 90%, 70%); - color: shadeOrTint(makeHighContrastColor($callOutColor, $statusBg), 0, 20%); - background-color: $statusBg; - } - } } .upgStepProgress__title { diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/step_progress.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/step_progress.tsx index a6e4f80223941..9d272df771d2d 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/step_progress.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/step_progress.tsx @@ -8,38 +8,64 @@ import classNames from 'classnames'; import React, { Fragment, ReactNode } from 'react'; -import { EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; +import { EuiIcon, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; +import { css } from '@emotion/react'; import './_step_progress.scss'; type STATUS = 'incomplete' | 'inProgress' | 'complete' | 'failed' | 'paused' | 'cancelled'; const StepStatus: React.FunctionComponent<{ status: STATUS; idx: number }> = ({ status, idx }) => { + const { euiTheme } = useEuiTheme(); if (status === 'incomplete') { return {idx + 1}.; } else if (status === 'inProgress') { return ; } else if (status === 'complete') { return ( - + ); } else if (status === 'paused') { return ( - + ); } else if (status === 'cancelled') { return ( - + ); } else if (status === 'failed') { return ( - + );