mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
19 lines
387 B
JavaScript
19 lines
387 B
JavaScript
import ControlTextInput from './ControlTextInput';
|
|
|
|
const SoftDescriptorInput = ( { value, onChange, placeholder } ) => {
|
|
const handleChange = ( newValue ) => {
|
|
if ( newValue.length <= 22 ) {
|
|
onChange( newValue );
|
|
}
|
|
};
|
|
|
|
return (
|
|
<ControlTextInput
|
|
value={ value }
|
|
onChange={ handleChange }
|
|
placeholder={ placeholder }
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SoftDescriptorInput;
|