@wordpress/block-library
Version:
Block library for the WordPress editor.
45 lines (44 loc) • 1.18 kB
JavaScript
/**
* WordPress dependencies
*/
import { SelectControl } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { InspectorControls } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import { htmlElementMessages } from '../../utils/messages';
import { jsx as _jsx } from "react/jsx-runtime";
export default function CommentsInspectorControls({
attributes: {
tagName
},
setAttributes
}) {
return /*#__PURE__*/_jsx(InspectorControls, {
children: /*#__PURE__*/_jsx(InspectorControls, {
group: "advanced",
children: /*#__PURE__*/_jsx(SelectControl, {
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: true,
label: __('HTML element'),
options: [{
label: __('Default (<div>)'),
value: 'div'
}, {
label: '<section>',
value: 'section'
}, {
label: '<aside>',
value: 'aside'
}],
value: tagName,
onChange: value => setAttributes({
tagName: value
}),
help: htmlElementMessages[tagName]
})
})
});
}
//# sourceMappingURL=comments-inspector-controls.js.map