Skip to content

Commit fbdee01

Browse files
authored
fix: Callout buttons rendered as links had incorrect styles (#522)
1 parent 3dd8f6d commit fbdee01

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/components/Callout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ const CalloutSC = styled.div<{
309309
'.children *:last-child': {
310310
marginBottom: '0',
311311
},
312+
'.children': {
313+
'& a, & a:any-link': {
314+
...theme.partials.text.inlineLink,
315+
},
316+
},
312317
'.buttonArea': {
313318
display: 'flex',
314319
gap: theme.spacing.xsmall,
@@ -350,9 +355,6 @@ const CalloutSC = styled.div<{
350355
width: 0,
351356
height: 0,
352357
},
353-
'& a, & a:any-link': {
354-
...theme.partials.text.inlineLink,
355-
},
356358
'.expandIcon': {
357359
...theme.partials.dropdown.arrowTransition({ isOpen: $expanded }),
358360
},

src/stories/Callout.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function ExpandableTemplate({
117117
key={style}
118118
severity={style}
119119
title={title}
120-
buttonProps={{ children: 'Learn more' }}
120+
buttonProps={{ children: 'Learn more', as: 'a' }}
121121
expandable
122122
defaultExpanded
123123
expanded={controlled ? expanded[i] : undefined}
@@ -156,7 +156,7 @@ function CloseableTemplate({ title }: CalloutProps) {
156156
key={style}
157157
severity={style}
158158
title={title}
159-
buttonProps={{ children: 'Learn more' }}
159+
buttonProps={{ children: 'Learn more', as: 'a' }}
160160
closeable
161161
closed={closed}
162162
onClose={setClosed}

0 commit comments

Comments
 (0)