mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
20 lines
387 B
JavaScript
20 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;
|