Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
bug(UIKIT-1564,PageHeader): Исправлена семантика (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
pan1caisreal authored Aug 7, 2024
1 parent 525bb48 commit 1ddf33e
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions packages/components/src/PageHeader/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,32 @@ export const PageHeader = <
<ArrowLOutlineMd />
</BackButton>
)}
<Title variant="h3" noWrap={isMobile}>
{typeof title === 'string' ? (
<OverflowTypography variant="inherit">{title}</OverflowTypography>
) : (
title
)}
</Title>
{typeof title === 'string' ? (
<Title variant="h3" noWrap={isMobile}>
<OverflowTypography component="div" variant="inherit">
{title}
</OverflowTypography>
</Title>
) : (
<Title
component="div"
role="heading"
variant="h3"
aria-level={3}
noWrap={isMobile}
>
{title}
</Title>
)}
</MobileWrapper>

{description && <Description>{description}</Description>}
{description && typeof description !== 'string' ? (
<Description component="div" role="heading" aria-level={4}>
{description}
</Description>
) : (
<Description>{description}</Description>
)}
{actions && (
<Actions>
<ButtonGroup {...actions} />
Expand Down

0 comments on commit 1ddf33e

Please sign in to comment.