From 8b1457e6a06fe4d36eae90ba9ed9b9af7f7fe432 Mon Sep 17 00:00:00 2001 From: martimalek <46452321+martimalek@users.noreply.github.com> Date: Fri, 3 Nov 2023 11:00:08 +0100 Subject: [PATCH] fix(infobanner): allow to override attrs in InfoBannerCard (#393) --- src/components/InfoBanner/blocks/InfoBannerCard.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/InfoBanner/blocks/InfoBannerCard.tsx b/src/components/InfoBanner/blocks/InfoBannerCard.tsx index 78ed51fea..05b85ed4d 100644 --- a/src/components/InfoBanner/blocks/InfoBannerCard.tsx +++ b/src/components/InfoBanner/blocks/InfoBannerCard.tsx @@ -14,15 +14,21 @@ interface CardProps extends BoxProps { emphasized?: boolean; } -const StyledTitle = styled(Headline).attrs({ as: 'h4', textAlign: 'left' })` +const StyledTitle = styled(Headline).attrs(props => ({ as: 'h4', textAlign: 'left', ...props }))` color: var(--info-banner-text-color); `; -const StyledDescription = styled(Text).attrs({ fontSize: 'small', textAlign: 'left' })` +const StyledDescription = styled(Text).attrs(props => ({ fontSize: 'small', textAlign: 'left', ...props }))` color: var(--info-banner-text-color); `; -const StyledLink = styled(WaveLink).attrs({ fontSize: 0, textAlign: 'left', target: '_blank', marginTop: '0.25rem' })` +const StyledLink = styled(WaveLink).attrs(props => ({ + fontSize: 0, + textAlign: 'left', + target: '_blank', + marginTop: '0.25rem', + ...props +}))` &:link, &:visited { color: var(--info-banner-link-color);