Skip to content

Commit

Permalink
styling adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrtj committed Nov 18, 2024
1 parent d895bfa commit 658117b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ const Influencer: FC<InfluencerProps> = ({ influencerFieldName, influencerFilter
/>
</div>
<div css={styles.progress}>
<div css={styles.progressBarHolder(barScore)}>
<div css={styles.progressBar(severity.id)} />
<div css={styles.progressBarHolder}>
<div css={styles.progressBar(severity.id, barScore)} />
</div>
<div css={styles.scoreLabel(severity.id)}>
<EuiToolTip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,19 @@ export const useInfluencersListStyles = () => {
color: euiTheme.euiColorDarkShade,
backgroundColor: 'transparent',
}),
progressBarHolder: (barScore: number) =>
css({
width: `${barScore}%`,
display: 'inline-block',
maxWidth: `calc(100% - 28px)`,
}),
progressBar: (severity: string) =>
progressBarHolder: css({
width: `calc(100% - 28px)`,
}),
progressBar: (severity: string, barScore: number) =>
css({
height: `calc(${euiTheme.euiSizeXS} / 2)`,
float: 'left',
marginTop: euiTheme.euiSizeM,
textAlign: 'right',
lineHeight: '18px',
display: 'inline-block',
transition: 'none',
width: `100%`,
width: `${barScore}%`,
backgroundColor:
severity === 'critical'
? mlColors.critical
Expand All @@ -66,7 +64,7 @@ export const useInfluencersListStyles = () => {
whiteSpace: 'nowrap',
fontSize: euiTheme.euiFontSizeXS,
marginLeft: euiTheme.euiSizeXS,
display: 'inline-block',
display: 'inline',
borderColor:
severity === 'critical'
? mlColors.critical
Expand Down

0 comments on commit 658117b

Please sign in to comment.