woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/ReusableComponents/Fields/RadioButton.js
2025-01-22 13:24:26 +01:00

19 lines
481 B
JavaScript

const RadioButton = ( { id, name, value, currentValue, handleRdbState } ) => {
return (
<div className="ppcp-r__radio">
{ /* todo: Can we remove the wrapper div? */ }
<input
className="ppcp-r__radio-value"
type="radio"
id={ id }
checked={ value === currentValue }
name={ name }
value={ value }
onChange={ () => handleRdbState( value ) }
/>
<span className="ppcp-r__radio-presentation"></span>
</div>
);
};
export default RadioButton;