Skip to content

Commit

Permalink
showTitlesAsTooltip prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Nov 15, 2024
1 parent d7839c7 commit 620981d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export default function QueryInspectorControls( props ) {
<PatternSelection
attributes={ attributes }
clientId={ clientId }
showTitlesAsTooltip
/>
</PanelBody>
) }
Expand Down
8 changes: 6 additions & 2 deletions packages/block-library/src/query/edit/pattern-selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export function PatternSelectionModal( {
);
}

export default function PatternSelection( { clientId, attributes } ) {
export default function PatternSelection( {
clientId,
attributes,
showTitlesAsTooltip = false,
} ) {
const [ searchValue, setSearchValue ] = useState( '' );
const { replaceBlock, selectBlock } = useDispatch( blockEditorStore );
const onBlockPatternSelect = ( pattern, blocks ) => {
Expand Down Expand Up @@ -83,7 +87,7 @@ export default function PatternSelection( { clientId, attributes } ) {
<BlockPatternsList
blockPatterns={ filteredBlockPatterns }
onClickPattern={ onBlockPatternSelect }
showTitlesAsTooltip
showTitlesAsTooltip={ showTitlesAsTooltip }
/>
</BlockContextProvider>
</div>
Expand Down

0 comments on commit 620981d

Please sign in to comment.