Skip to content

Commit

Permalink
update legend css overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 committed Nov 12, 2024
1 parent 2687d61 commit 999a7c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const OverallDetails: FC<{
}> = ({ overallDetails }) => (
<EuiFlexGroup alignItems="center" wrap data-test-subj={overallDetails.dataTestSubj}>
{overallDetails.items.map((item) => {
const key = `${item.title}`;
const key = item.title;
if (item.title === 'badge') {
return (
<EuiFlexItem grow={false} key={key}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
euiBorderWidthThick,
} = theme;

const cssOverrideBase = {
height: euiSizeM,
width: euiSizeM,
backgroundColor: euiColorGhost,
display: 'inline-block',
};

return (
<EuiFlexGroup alignItems="center" data-test-subj="mlPageDataFrameAnalyticsMapLegend">
<EuiFlexItem grow={false}>
Expand All @@ -57,12 +64,10 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
<span
data-test-subj="mlJobMapLegend__sourceNode"
css={{
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorWarning}`,
border: `${euiBorderThin}`,
borderRadius: `${euiBorderRadius}`,
display: 'inline-block',
...cssOverrideBase,
backgroundColor: euiColorWarning,
border: euiBorderThin,
borderRadius: euiBorderRadius,
}}
/>
</EuiFlexItem>
Expand All @@ -82,12 +87,9 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
<span
data-test-subj="mlJobMapLegend__indexPattern"
css={{
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorGhost}`,
...cssOverrideBase,
border: `${euiBorderWidthThick} solid ${theme.euiColorVis2}`,
transform: 'rotate(45deg)',
display: 'inline-block',
}}
/>
</EuiFlexItem>
Expand All @@ -107,12 +109,9 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
<span
data-test-subj="mlJobMapLegend__ingestPipeline"
css={{
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorGhost}`,
...cssOverrideBase,
border: `${euiBorderWidthThick} solid ${theme.euiColorVis7}`,
borderRadius: `${euiBorderRadiusSmall}`,
display: 'inline-block',
borderRadius: euiBorderRadiusSmall,
}}
/>
</EuiFlexItem>
Expand All @@ -132,11 +131,8 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
<span
data-test-subj="mlJobMapLegend__transform"
css={{
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorGhost}`,
...cssOverrideBase,
border: `${euiBorderWidthThick} solid ${theme.euiColorVis1}`,
display: 'inline-block',
}}
/>
</EuiFlexItem>
Expand Down Expand Up @@ -178,12 +174,9 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
<span
data-test-subj="mlJobMapLegend__analyticsMissing"
css={{
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorGhost}`,
...cssOverrideBase,
border: `${euiBorderWidthThick} solid ${theme.euiColorFullShade}`,
borderRadius: '50%',
display: 'inline-block',
}}
/>
</EuiFlexItem>
Expand All @@ -204,12 +197,9 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType
<span
data-test-subj="mlJobMapLegend__analytics"
css={{
height: `${euiSizeM}`,
width: `${euiSizeM}`,
backgroundColor: `${euiColorGhost}`,
...cssOverrideBase,
border: `${euiBorderWidthThick} solid ${theme.euiColorVis0}`,
borderRadius: '50%',
display: 'inline-block',
}}
/>
</EuiFlexItem>
Expand Down

0 comments on commit 999a7c7

Please sign in to comment.