Skip to content

Commit

Permalink
Increase contrast on banner alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
bl-nero authored and github-actions committed Sep 4, 2024
1 parent c0e948f commit 1fd6942
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions web/packages/teleport/src/components/BannerList/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ export function Banner({
link = '',
onClose,
}: Props) {
const textColor = severity === 'danger' ? 'text.primaryInverse' : 'text.main';
const icon = {
info: <Info mr={3} size="medium" role="icon" />,
warning: <Info mr={3} size="medium" role="icon" />,
danger: <Warning mr={3} size="medium" role="icon" />,
info: <Info mr={3} size="medium" role="icon" color={textColor} />,
warning: <Info mr={3} size="medium" role="icon" color={textColor} />,
danger: <Warning mr={3} size="medium" role="icon" color={textColor} />,
}[severity];

const isValidTeleportLink = (link: string) => {
Expand Down Expand Up @@ -72,7 +73,7 @@ export function Banner({
<Link
href={link}
target="_blank"
color="text.primaryInverse"
color={textColor}
style={{ fontWeight: 'bold' }}
onClick={() =>
userEventService.captureUserEvent({
Expand All @@ -84,7 +85,9 @@ export function Banner({
{message}
</Link>
) : (
<Text bold>{message}</Text>
<Text color={textColor} bold>
{message}
</Text>
)}
<CloseButton
onClick={() => {
Expand Down

0 comments on commit 1fd6942

Please sign in to comment.