Skip to content

Commit

Permalink
Merge pull request #2429 from WTTJ/fix-rollback-modal-header-a11y
Browse files Browse the repository at this point in the history
fix: rollback modal header a11y
  • Loading branch information
mleralec authored Mar 14, 2024
2 parents e373e51 + a67fdd1 commit fa8a50a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/Modal/src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ export const Header = forwardRef<'div', HeaderProps>(({ icon, subtitle, title, .
<S.Header ref={ref} textAlign={icon ? 'center' : null} w="100%" {...rest}>
<Close isOnHeader />
{icon}
{typeof title === 'string' ? (
<Text mb={subtitle ? 'lg' : 0} mt={icon ? 'xl' : 0} variant="h4">
{title}
</Text>
) : (
title
)}
<Text mb={subtitle ? 'lg' : 0} mt={icon ? 'xl' : 0} variant="h4">
{title}
</Text>
{subtitle && <S.HeaderSubtitle>{subtitle}</S.HeaderSubtitle>}
</S.Header>
)
Expand Down

0 comments on commit fa8a50a

Please sign in to comment.