Skip to content

Latest commit

 

History

History

use-has-selected-inner-block

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

useHasSelectedInnerBlock

Determine whether one of the inner blocks currently is selected.

Usage

import { useHasSelectedInnerBlock } from '@10up/block-components';

function BlockEdit( props ) {
    const hasSelectedInnerBlock = useHasSelectedInnerBlock();

    return (
        <div>
            { hasSelectedInnerBlock ? 'InnerBlocks are selected' : 'InnerBlocks are not selected' }
        </div>
    )
}