Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 425 Bytes

File metadata and controls

19 lines (14 loc) · 425 Bytes

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>
    )
}