woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/ReusableComponents/Controls/SoftdescriptorInput.js

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;