Skip to content

Commit

Permalink
feat: Auto wrap balance for question and banner titles (#2714)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s authored Jan 30, 2024
1 parent 96af82d commit 3d0f005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const QuestionHeader: React.FC<IQuestionHeader> = ({
role="heading"
aria-level={1}
component="h1"
sx={{ textWrap: "balance" }}
>
{title}
</Typography>
Expand Down
6 changes: 5 additions & 1 deletion editor.planx.uk/src/ui/public/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ function Banner(props: BannerProps) {
titleAccess={props.iconTitle}
/>
)}
{props.heading && <Typography variant="h1">{props.heading}</Typography>}
{props.heading && (
<Typography variant="h1" sx={{ textWrap: "balance" }}>
{props.heading}
</Typography>
)}
{props.children}
</Container>
</Root>
Expand Down

0 comments on commit 3d0f005

Please sign in to comment.