Skip to content

Commit

Permalink
Typography Presets: Use && rather than ? (WordPress#59920)
Browse files Browse the repository at this point in the history
Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: jeryj <jeryj@git.wordpress.org>
  • Loading branch information
3 people authored and carstingaxion committed Mar 27, 2024
1 parent f8fb8c2 commit b091104
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,35 @@ export default function TypographyVariations() {
columns={ 3 }
className="edit-site-global-styles-style-variations-container"
>
{ typographyVariations && typographyVariations.length
? typographyVariations.map( ( variation, index ) => (
<Variation key={ index } variation={ variation }>
{ ( isFocused ) => (
<PreviewIframe
label={ variation?.title }
isFocused={ isFocused }
>
{ ( { ratio, key } ) => (
<HStack
key={ key }
spacing={ 10 * ratio }
justify="center"
style={ {
height: '100%',
overflow: 'hidden',
} }
>
<TypographyExample
variation={ variation }
fontSize={ 85 * ratio }
/>
</HStack>
) }
</PreviewIframe>
) }
</Variation>
) )
: null }
{ typographyVariations &&
typographyVariations.length &&
typographyVariations.map( ( variation, index ) => (
<Variation key={ index } variation={ variation }>
{ ( isFocused ) => (
<PreviewIframe
label={ variation?.title }
isFocused={ isFocused }
>
{ ( { ratio, key } ) => (
<HStack
key={ key }
spacing={ 10 * ratio }
justify="center"
style={ {
height: '100%',
overflow: 'hidden',
} }
>
<TypographyExample
variation={ variation }
fontSize={ 85 * ratio }
/>
</HStack>
) }
</PreviewIframe>
) }
</Variation>
) ) }
</Grid>
</VStack>
);
Expand Down

0 comments on commit b091104

Please sign in to comment.