/**
* WordPress dependencies
*/
import { __, _x } from '@wordpress/i18n';
import {
__experimentalToggleGroupControl as ToggleGroupControl,
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
__experimentalSpacer as Spacer,
} from '@wordpress/components';
import { useState } from '@wordpress/element';
/**
* Internal dependencies
*/
import TypographyPanel from './typography-panel';
import { ScreenHeader } from './screen-header';
import TypographyPreview from './typography-preview';
const elements = {
text: {
description: __( 'Manage the fonts used on the site.' ),
title: __( 'Text' ),
},
link: {
description: __( 'Manage the fonts and typography used on the links.' ),
title: __( 'Links' ),
},
heading: {
description: __( 'Manage the fonts and typography used on headings.' ),
title: __( 'Headings' ),
},
caption: {
description: __( 'Manage the fonts and typography used on captions.' ),
title: __( 'Captions' ),
},
button: {
description: __( 'Manage the fonts and typography used on buttons.' ),
title: __( 'Buttons' ),
},
};
interface ScreenTypographyElementProps {
element: keyof typeof elements;
}
function ScreenTypographyElement( { element }: ScreenTypographyElementProps ) {
const [ headingLevel, setHeadingLevel ] = useState( 'heading' );
return (
<>
{ element === 'heading' && (
setHeadingLevel( value as string )
}
isBlock
size="__unstable-large"
>
) }
>
);
}
export default ScreenTypographyElement;