fixed payment switch btn
This commit was merged in pull request #72.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import React from 'react'
|
||||
|
||||
export default function SubcribePaymentOptions(){
|
||||
export default function SubcribePaymentOptions({activePaymentType, setActivePaymentType}){
|
||||
|
||||
const handleSwitch = ({target:{name, value}}) => {
|
||||
console.log('SWITCH', name, value)
|
||||
setActivePaymentType(value)
|
||||
}
|
||||
|
||||
return <>
|
||||
|
||||
@@ -13,13 +18,13 @@ export default function SubcribePaymentOptions(){
|
||||
<div className="card-body">
|
||||
|
||||
<div className="form-check form-check-inline">
|
||||
<input className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1"
|
||||
value="option1" />
|
||||
<input onChange={handleSwitch} className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1"
|
||||
value="previous" checked={activePaymentType == 'previous'} />
|
||||
<label className="form-check-label" htmlFor="inlineRadio1">Previous Cards</label>
|
||||
</div>
|
||||
<div className="form-check form-check-inline">
|
||||
<input className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2"
|
||||
value="option2" />
|
||||
<input onChange={handleSwitch} className="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2"
|
||||
value="new" checked={activePaymentType == 'new'} />
|
||||
<label className="form-check-label" htmlFor="inlineRadio2">Add New card</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user