Skip to content

Commit

Permalink
Use color from euiTheme hook instead of hardcoded one
Browse files Browse the repository at this point in the history
  • Loading branch information
dasansol92 committed Jun 3, 2022
1 parent c2c9343 commit c9a179d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
EuiText,
EuiTreeView,
EuiBadge,
useEuiTheme,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
Expand Down Expand Up @@ -91,6 +92,7 @@ export const AgentDetailsIntegration: React.FunctionComponent<{
packagePolicy: PackagePolicy;
}> = memo(({ agent, agentPolicy, packagePolicy }) => {
const { getHref } = useLink();
const theme = useEuiTheme();

const [showNeedsAttentionBadge, setShowNeedsAttentionBadge] = useState(false);
const extensionView = useUIExtension(
Expand Down Expand Up @@ -195,7 +197,7 @@ export const AgentDetailsIntegration: React.FunctionComponent<{
</EuiFlexItem>
{showNeedsAttentionBadge && (
<EuiFlexItem grow={false}>
<EuiBadge color="#BD271E" iconType="alert" iconSide="left">
<EuiBadge color={theme.euiTheme.colors.danger} iconType="alert" iconSide="left">
<FormattedMessage
id="xpack.fleet.agentDetailsIntegrations.needsAttention.label"
defaultMessage="Needs attention"
Expand Down

0 comments on commit c9a179d

Please sign in to comment.