/** * External dependencies */ import PropTypes from 'prop-types'; import classnames from 'classnames'; import { useState } from '@wordpress/element'; import { withInstanceId } from 'wordpress-compose'; /** * Internal dependencies */ import Label from '../label'; import './style.scss'; const TextInput = ( { className, instanceId, id, type = 'text', ariaLabel, label, screenReaderLabel, disabled, help, autoComplete = 'off', value = '', onChange, required = false, } ) => { const [ isActive, setIsActive ] = useState( false ); const onChangeValue = ( event ) => onChange( event.target.value ); const textInputId = id || 'textinput-' + instanceId; return (
{ help }
) }