/** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; import { useContext } from '@wordpress/element'; import { ToggleControl } from '@wordpress/components'; import { Card, CollapsibleCard, Stack } from '@wordpress/ui'; /** * Internal dependencies */ import { AdminContext } from '../../../index'; export default function PermissionEditor() { const { options, setOptions } = useContext( AdminContext ); const onBlockEditorChange = ( value: boolean ) => { setOptions( { ...options, permissionBlockEditor: value, } ); }; const onClassicEditorChange = ( value: boolean ) => { setOptions( { ...options, permissionClassicEditor: value, } ); }; const onThemePluginEditorChange = ( value: boolean ) => { setOptions( { ...options, permissionThemePluginEditor: value, } ); }; return ( }> { __( 'Editors allowed to use this extension', 'custom-html-block-extension' ) } ); }