Skip to content

Commit

Permalink
PromoVideo font selector + remove leading
Browse files Browse the repository at this point in the history
  • Loading branch information
martinadam75 committed Oct 9, 2024
1 parent 4628c0b commit c155c73
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions sections/Content/PromoVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ import { AppContext } from "$store/apps/site.ts";

interface RichText{
/** @format rich-text */
title?: string;
/** @format rich-text */
subtitle?: string;
content: string
fontFamily?: 'Inter' | 'Times';
}

interface HeadingProps {
mobile?: RichText;
desktop?: RichText;
interface Heading{
title?: RichText;
subtitle?: RichText;
}

export interface Props {
heading?: HeadingProps;
heading?: {
mobile?: Heading;
desktop?: Heading;
}
video: string;
}

Expand All @@ -32,23 +34,23 @@ export default function PromoVideo(
{isMobile ? (
<>
<h2
class="text-[1.5rem] md:text-[3.375rem] leading-7 md:leading-[110%] font-extrabold"
dangerouslySetInnerHTML={{ __html: heading?.mobile?.title ?? "" }}
class={`text-[1.5rem] md:text-[3.375rem] leading-7 font-extrabold ${heading?.mobile?.title?.fontFamily == 'Inter' ? '' : 'f-roman' } `}
dangerouslySetInnerHTML={{ __html: heading?.mobile?.title?.content ?? "" }}
/>

<p class="text-base md:text-[1.25rem] leading-[135%] md:leading-[150%] font-light"
dangerouslySetInnerHTML={{ __html: heading?.mobile?.subtitle ?? "" }}
<p class={`text-base md:text-[1.25rem] leading-[135%] md:leading-[150%] font-light ${heading?.desktop?.title?.fontFamily == 'Inter' ? '' : 'f-roman' }`}
dangerouslySetInnerHTML={{ __html: heading?.mobile?.subtitle?.content ?? "" }}
/>
</>
) :
<>
<h2
class="text-[1.5rem] md:text-[3.375rem] leading-7 md:leading-[110%] font-extrabold"
dangerouslySetInnerHTML={{ __html: heading?.desktop?.title ?? "" }}
class={`text-[1.5rem] md:text-[3.375rem] leading-7 font-extrabold ${heading?.mobile?.title?.fontFamily == 'Inter' ? '' : 'f-roman' } `}
dangerouslySetInnerHTML={{ __html: heading?.desktop?.title?.content ?? "" }}
/>

<p class="text-base md:text-[1.25rem] leading-[135%] md:leading-[150%] font-light"
dangerouslySetInnerHTML={{ __html: heading?.desktop?.subtitle ?? "" }}
<p class={`text-base md:text-[1.25rem] leading-[135%] md:leading-[150%] font-light ${heading?.desktop?.title?.fontFamily == 'Inter' ? '' : 'f-roman' }`}
dangerouslySetInnerHTML={{ __html: heading?.desktop?.subtitle?.content ?? "" }}
/>
</>
}
Expand Down

0 comments on commit c155c73

Please sign in to comment.