Skip to content

Commit

Permalink
♻️ After review #1887
Browse files Browse the repository at this point in the history
  • Loading branch information
padms committed Nov 2, 2023
1 parent 910d8c0 commit af8ec60
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sanityv3/schemas/editors/titleEditorContentType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const configureTitleBlockContent = (options: TitleContentProps = {}): Blo
}

const textColorConfig = {
title: 'HighLight',
title: 'Highlight',
value: 'highlight',
icon: EdsBlockEditorIcon(format_color_text),
component: HighlightTextRender,
Expand Down
4 changes: 2 additions & 2 deletions web/pageComponents/shared/Hero/DefaultHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export const DefaultHero = ({ title, image, isBigTitle, bigTitle }: Props) => {
<>
{isBigTitle && (
<>
<HeroBannerSmall>{title && <TitleText value={title} level="h2" size="xl" />}</HeroBannerSmall>
<HeroBannerBigTitle>{bigTitle && <TitleText value={bigTitle} level="h1" size="3xl" />}</HeroBannerBigTitle>
<HeroBannerSmall>{title && <TitleText value={title} level="h1" size="xl" />}</HeroBannerSmall>
<HeroBannerBigTitle>{bigTitle && <TitleText value={bigTitle} level="h2" size="3xl" />}</HeroBannerBigTitle>
</>
)}
{!isBigTitle && <HeroBanner>{title && <StyledHeading value={title} level="h1" size="3xl" />}</HeroBanner>}
Expand Down
7 changes: 5 additions & 2 deletions web/pageComponents/shared/Hero/FiftyFiftyHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ const StyledIngress = styled.div`
display: none;
}
`
const StyledHeroTitle = styled(TitleText)`
const StyledHeroTitle = styled(TitleText).attrs((props: { $isBigTitle: boolean }) => props)`
max-width: 1186px; /* 1920 - (2 * 367) */
font-weight: ${(props) => (props.$isBigTitle ? 'var(--fontWeight-regular)' : 'var(--fontWeight-medium)')};
`

const HeroActionLink = ({ action, ...rest }: { action: LinkData }) => {
Expand Down Expand Up @@ -96,7 +97,9 @@ export const FiftyFiftyHero = ({ title, ingress, link, background, figure, isBig
)}
</StyledMedia>
<StyledContent>
{title && <StyledHeroTitle value={title} level="h1" size={isBigTitle ? '2xl' : 'xl'} />}
{title && (
<StyledHeroTitle $isBigTitle={isBigTitle} value={title} level="h1" size={isBigTitle ? '2xl' : 'xl'} />
)}
{ingress && !isBigTitle && (
<StyledIngress>
<IngressText
Expand Down

0 comments on commit af8ec60

Please sign in to comment.