@wordpress/block-library
Version:
Block library for the WordPress editor.
43 lines (42 loc) • 1.07 kB
JavaScript
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { InspectorControls, privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import { unlock } from '../../lock-unlock';
import { jsx as _jsx } from "react/jsx-runtime";
const {
HTMLElementControl
} = unlock(blockEditorPrivateApis);
export default function CommentsInspectorControls({
attributes: {
tagName
},
setAttributes
}) {
return /*#__PURE__*/_jsx(InspectorControls, {
children: /*#__PURE__*/_jsx(InspectorControls, {
group: "advanced",
children: /*#__PURE__*/_jsx(HTMLElementControl, {
tagName: tagName,
onChange: value => setAttributes({
tagName: value
}),
options: [{
label: __('Default (<div>)'),
value: 'div'
}, {
label: '<section>',
value: 'section'
}, {
label: '<aside>',
value: 'aside'
}]
})
})
});
}
//# sourceMappingURL=comments-inspector-controls.js.map