@wordpress/components
Version:
UI components for WordPress.
42 lines (38 loc) • 890 B
JavaScript
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({
label,
hideLabelFromVision,
value,
help,
className,
instanceId,
onChange,
type = 'text',
placeholder,
...props
}) {
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