Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Add pattern title to the Pattern Block sidebar panel heading (#197)
Browse files Browse the repository at this point in the history
Conditionally shows the pattern title as heading in the sidebar once a pattern is selected.
  • Loading branch information
dreamwhisper authored Jun 15, 2023
1 parent bc81bfa commit 9bd2fad
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ function PatternInspector( { pattern }: PatternInspectorProps ) {
<InspectorControls>
<Panel>
<PanelBody
title={ __( 'Pattern', 'pattern-manager' ) }
title={
pattern
? pattern.title
: __( 'Pattern', 'pattern-manager' )
}
initialOpen={ true }
>
<p>
Expand Down

0 comments on commit 9bd2fad

Please sign in to comment.