UNPKG

707 BJavaScriptView Raw
1import { createElement } from "@wordpress/element";
2
3/**
4 * WordPress dependencies
5 */
6import { __ } from '@wordpress/i18n';
7/**
8 * Internal dependencies
9 */
10
11import { PlainText } from '@wordpress/block-editor';
12export default function CodeEdit(_ref) {
13 var attributes = _ref.attributes,
14 setAttributes = _ref.setAttributes,
15 className = _ref.className;
16 return createElement("div", {
17 className: className
18 }, createElement(PlainText, {
19 value: attributes.content,
20 onChange: function onChange(content) {
21 return setAttributes({
22 content: content
23 });
24 },
25 placeholder: __('Write code…'),
26 "aria-label": __('Code')
27 }));
28}
29//# sourceMappingURL=edit.js.map
\No newline at end of file