UNPKG

@wordpress/components

Version:
43 lines (39 loc) 931 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@wordpress/element"; /** * WordPress dependencies */ import { memo } from '@wordpress/element'; /** * Internal dependencies */ import Cell from '../mobile/bottom-sheet/cell'; function TextControl(_ref) { let { label, hideLabelFromVision, value, help, className, instanceId, onChange, type = 'text', placeholder, ...props } = _ref; const id = `inspector-text-control-${instanceId}`; return createElement(Cell, _extends({ label: label, hideLabelFromVision: hideLabelFromVision, id: id, help: help, className: className, type: type, value: value, onChangeValue: onChange, "aria-describedby": !!help ? id + '__help' : undefined, valuePlaceholder: placeholder }, props)); } export default memo(TextControl); //# sourceMappingURL=index.native.js.map