Skip to content

Commit

Permalink
💄 Fix stylistic issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Apr 20, 2023
1 parent 00cae94 commit 10fe021
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 20 deletions.
31 changes: 27 additions & 4 deletions x-pack/plugins/lens/public/datasources/form_based/info_badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,39 @@ export function ReducedSamplingSectionEntries({
{layerPalette ? (
<EuiFlexItem grow={false}>
{layerPalette.length === 1 ? (
<EuiIcon color={layerPalette[0]} type="stopFilled" />
<EuiIcon
color={layerPalette[0]}
type="stopFilled"
css={css`
margin-top: 2px;
`}
/>
) : (
<EuiIcon type="color" />
<EuiIcon
type="color"
css={css`
margin-top: 2px;
`}
/>
)}
</EuiFlexItem>
) : null}
<EuiFlexItem grow={Boolean(layerPalette)}>
<EuiFlexItem
grow={Boolean(layerPalette)}
css={css`
width: 150px;
`}
>
<EuiText size="s">{layerTitle}</EuiText>
{layerPalette && layerPalette.length > 1 ? (
<EuiColorPaletteDisplay size="xs" palette={layerPalette} />
<EuiColorPaletteDisplay
size="xs"
palette={layerPalette}
css={css`
margin-top: 4px;
width: 150px;
`}
/>
) : null}
</EuiFlexItem>
<EuiFlexItem
Expand Down
26 changes: 14 additions & 12 deletions x-pack/plugins/lens/public/embeddable/embeddable_info_badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,21 @@ export const EmbeddableFeatureBadge = ({ messages }: { messages: UserMessage[] }
bottomPadding = euiTheme.size.base;
}
return (
<aside
key={`${shortMessage}-${index}`}
css={css`
padding: ${!isFirstItem ? 0 : euiTheme.size.base} ${euiTheme.size.base}
${bottomPadding};
`}
>
<>
{index ? <EuiHorizontalRule margin="s" /> : null}
<EuiTitle size="xxs" css={css`color=${euiTheme.colors.title}`}>
<h3>{shortMessage}</h3>
</EuiTitle>
<ul className="lnsEmbeddablePanelFeatureList">{longMessage}</ul>
</aside>
<aside
key={`${shortMessage}-${index}`}
css={css`
padding: ${!isFirstItem ? 0 : euiTheme.size.base} ${euiTheme.size.base}
${bottomPadding};
`}
>
<EuiTitle size="xxs" css={css`color=${euiTheme.colors.title}`}>
<h3>{shortMessage}</h3>
</EuiTitle>
<ul className="lnsEmbeddablePanelFeatureList">{longMessage}</ul>
</aside>
</>
);
})}
</div>
Expand Down
31 changes: 27 additions & 4 deletions x-pack/plugins/lens/public/visualizations/xy/info_badges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,39 @@ export function IgnoredGlobalFiltersEntries({
{layerPalette ? (
<EuiFlexItem grow={false}>
{layerPalette.length === 1 ? (
<EuiIcon color={layerPalette[0]} type="stopFilled" />
<EuiIcon
color={layerPalette[0]}
type="stopFilled"
css={css`
margin-top: 2px;
`}
/>
) : (
<EuiIcon type="color" />
<EuiIcon
type="color"
css={css`
margin-top: 2px;
`}
/>
)}
</EuiFlexItem>
) : null}
<EuiFlexItem grow={Boolean(layerPalette)}>
<EuiFlexItem
grow={Boolean(layerPalette)}
css={css`
width: 150px;
`}
>
<EuiText size="s">{layerTitle}</EuiText>
{layerPalette && layerPalette.length > 1 ? (
<EuiColorPaletteDisplay size="xs" palette={layerPalette} />
<EuiColorPaletteDisplay
size="xs"
palette={layerPalette}
css={css`
margin-top: 4px;
width: 150px;
`}
/>
) : null}
</EuiFlexItem>
</EuiFlexGroup>
Expand Down

0 comments on commit 10fe021

Please sign in to comment.