@wordpress/block-library
Version:
Block library for the WordPress editor.
29 lines (27 loc) • 707 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { PlainText } from '@wordpress/block-editor';
export default function CodeEdit(_ref) {
var attributes = _ref.attributes,
setAttributes = _ref.setAttributes,
className = _ref.className;
return createElement("div", {
className: className
}, createElement(PlainText, {
value: attributes.content,
onChange: function onChange(content) {
return setAttributes({
content: content
});
},
placeholder: __('Write code…'),
"aria-label": __('Code')
}));
}
//# sourceMappingURL=edit.js.map