Skip to content

Commit

Permalink
Fix rebase merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Aug 6, 2021
1 parent 4de7c1d commit f2ab691
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
38 changes: 19 additions & 19 deletions packages/block-editor/src/hooks/typography.js
Expand Up @@ -3,8 +3,8 @@
*/
import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
import {
__experimentalProgressiveDisclosurePanel as ProgressiveDisclosurePanel,
__experimentalProgressiveDisclosurePanelItem as ProgressiveDisclosurePanelItem,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
} from '@wordpress/components';
import { Platform } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -112,83 +112,83 @@ export function TypographyPanel( props ) {

return (
<InspectorControls>
<ProgressiveDisclosurePanel
<ToolsPanel
label={ __( 'Typography options' ) }
title={ __( 'Typography' ) }
header={ __( 'Typography' ) }
resetAll={ resetAll }
className="typography-controls"
>
{ ! isFontFamilyDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasFontFamilyValue( props ) }
label={ __( 'Font family' ) }
onDeselect={ () => resetFontFamily( props ) }
isShownByDefault={ defaultControls?.fontFamily }
>
<FontFamilyEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ ! isFontSizeDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasFontSizeValue( props ) }
label={ __( 'Font size' ) }
onDeselect={ () => resetFontSize( props ) }
isShownByDefault={ defaultControls?.fontSize }
>
<FontSizeEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ ! isFontAppearanceDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasFontAppearanceValue( props ) }
label={ __( 'Appearance' ) }
onDeselect={ () => resetFontAppearance( props ) }
isShownByDefault={ defaultControls?.fontAppearance }
>
<FontAppearanceEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ ! isLineHeightDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasLineHeightValue( props ) }
label={ __( 'Line height' ) }
onDeselect={ () => resetLineHeight( props ) }
isShownByDefault={ defaultControls?.lineHeight }
>
<LineHeightEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ ! isTextDecorationDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasTextDecorationValue( props ) }
label={ __( 'Decoration' ) }
onDeselect={ () => resetTextDecoration( props ) }
isShownByDefault={ defaultControls?.textDecoration }
>
<TextDecorationEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ ! isTextTransformDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasTextTransformValue( props ) }
label={ __( 'Letter case' ) }
onDeselect={ () => resetTextTransform( props ) }
isShownByDefault={ defaultControls?.textTransform }
>
<TextTransformEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ ! isLetterSpacingDisabled && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ () => hasLetterSpacingValue( props ) }
label={ __( 'Letter-spacing' ) }
onDeselect={ () => resetLetterSpacing( props ) }
isShownByDefault={ defaultControls?.letterSpacing }
>
<LetterSpacingEdit { ...props } />
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
</ProgressiveDisclosurePanel>
</ToolsPanel>
</InspectorControls>
);
}
Expand Down
38 changes: 19 additions & 19 deletions packages/edit-site/src/components/sidebar/typography-panel.js
Expand Up @@ -10,8 +10,8 @@ import {
__experimentalTextTransformControl as TextTransformControl,
} from '@wordpress/block-editor';
import {
__experimentalProgressiveDisclosurePanel as ProgressiveDisclosurePanel,
__experimentalProgressiveDisclosurePanelItem as ProgressiveDisclosurePanelItem,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
FontSizePicker,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -154,14 +154,14 @@ export default function TypographyPanel( {
};

return (
<ProgressiveDisclosurePanel
<ToolsPanel
label={ __( 'Typography options' ) }
title={ __( 'Typography' ) }
header={ __( 'Typography' ) }
resetAll={ resetAll }
className="typography-controls"
>
{ showFontFamilyControl && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ createHasValueCallback( 'fontFamily' ) }
label={ __( 'Font family' ) }
onDeselect={ createResetCallback( 'fontFamily' ) }
Expand All @@ -172,10 +172,10 @@ export default function TypographyPanel( {
value={ getStyle( name, 'fontFamily' ) }
onChange={ handleOnChange( 'fontFamily' ) }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ showFontSizeControl && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ createHasValueCallback( 'fontSize' ) }
label={ __( 'Font size' ) }
onDeselect={ createResetCallback( 'fontSize' ) }
Expand All @@ -188,10 +188,10 @@ export default function TypographyPanel( {
disableCustomFontSizes={ disableCustomFontSizes }
allowReset={ false }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ showAppearanceControl && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ hasFontAppearanceValue }
label={ __( 'Appearance' ) }
onDeselect={ resetFontAppearance }
Expand All @@ -209,10 +209,10 @@ export default function TypographyPanel( {
hasFontStyles={ hasFontStyles }
hasFontWeights={ hasFontWeights }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ showLineHeightControl && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ createHasValueCallback( 'lineHeight' ) }
label={ __( 'Line height' ) }
onDeselect={ createResetCallback( 'lineHeight' ) }
Expand All @@ -222,10 +222,10 @@ export default function TypographyPanel( {
value={ getStyle( name, 'lineHeight' ) }
onChange={ handleOnChange( 'lineHeight' ) }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ showTextDecoration && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ createHasValueCallback( 'textDecoration' ) }
label={ __( 'Decoration' ) }
onDeselect={ createResetCallback( 'textDecoration' ) }
Expand All @@ -235,10 +235,10 @@ export default function TypographyPanel( {
value={ getStyle( name, 'textDecoration' ) }
onChange={ handleOnChange( 'textDecoration' ) }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ showTextTransform && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ createHasValueCallback( 'textTransform' ) }
label={ __( 'Letter case' ) }
onDeselect={ createResetCallback( 'textTransform' ) }
Expand All @@ -248,10 +248,10 @@ export default function TypographyPanel( {
value={ getStyle( name, 'textTransform' ) }
onChange={ handleOnChange( 'textTransform' ) }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
{ showLetterSpacingControl && (
<ProgressiveDisclosurePanelItem
<ToolsPanelItem
hasValue={ createHasValueCallback( 'letterSpacing' ) }
label={ __( 'Letter-spacing' ) }
onDeselect={ createResetCallback( 'letterSpacing' ) }
Expand All @@ -261,8 +261,8 @@ export default function TypographyPanel( {
value={ getStyle( name, 'letterSpacing' ) }
onChange={ handleOnChange( 'letterSpacing' ) }
/>
</ProgressiveDisclosurePanelItem>
</ToolsPanelItem>
) }
</ProgressiveDisclosurePanel>
</ToolsPanel>
);
}

0 comments on commit f2ab691

Please sign in to comment.