Skip to content

Commit

Permalink
fix(infobanner): allow to override attrs in InfoBannerCard (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
martimalek authored Nov 3, 2023
1 parent 58eeb7e commit 8b1457e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/InfoBanner/blocks/InfoBannerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b1457e

Please sign in to comment.