Skip to content

Commit

Permalink
Revert "Font Library: Group fonts by source (#63211)"
Browse files Browse the repository at this point in the history
  • Loading branch information
vcanales committed Sep 24, 2024
1 parent 327ff86 commit ef44d04
Showing 1 changed file with 5 additions and 28 deletions.
33 changes: 5 additions & 28 deletions packages/edit-site/src/components/global-styles/font-families.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { __, _x } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
import {
__experimentalText as Text,
__experimentalItemGroup as ItemGroup,
Expand Down Expand Up @@ -61,14 +61,9 @@ function FontFamilies() {
) }

<VStack spacing={ 4 }>
{ themeFonts.length > 0 && (
<VStack>
<Subtitle level={ 3 }>
{
/* translators: Heading for a list of fonts provided by the theme. */
_x( 'Theme', 'font source' )
}
</Subtitle>
{ [ ...themeFonts, ...customFonts ].length > 0 && (
<>
<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
<ItemGroup size="large" isBordered isSeparated>
{ themeFonts.map( ( font ) => (
<FontFamilyItem
Expand All @@ -77,25 +72,7 @@ function FontFamilies() {
/>
) ) }
</ItemGroup>
</VStack>
) }
{ customFonts.length > 0 && (
<VStack>
<Subtitle level={ 3 }>
{
/* translators: Heading for a list of fonts installed by the user. */
_x( 'Custom', 'font source' )
}
</Subtitle>
<ItemGroup size="large" isBordered isSeparated>
{ customFonts.map( ( font ) => (
<FontFamilyItem
key={ font.slug }
font={ font }
/>
) ) }
</ItemGroup>
</VStack>
</>
) }
{ ! hasFonts && (
<VStack>
Expand Down

0 comments on commit ef44d04

Please sign in to comment.