UNPKG

@gechiui/block-editor

Version:
36 lines (31 loc) 759 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * GeChiUI dependencies */ import { forwardRef } from '@gechiui/element'; /** * Internal dependencies */ import RichText from '../rich-text'; const EditableText = forwardRef((props, ref) => { return createElement(RichText, _extends({ ref: ref }, props, { __unstableDisableFormats: true, preserveWhiteSpace: true })); }); EditableText.Content = _ref => { let { value = '', tagName: Tag = 'div', ...props } = _ref; return createElement(Tag, props, value); }; /** * Renders an editable text input in which text formatting is not allowed. */ export default EditableText; //# sourceMappingURL=index.js.map