35 lines
1.5 KiB
React
35 lines
1.5 KiB
React
import React from 'react'
|
|
|
|
export default function SubcribePaymentOptions({activePaymentType, setActivePaymentType}){
|
|
|
|
const handleSwitch = ({target:{name, value}}) => {
|
|
console.log('SWITCH', name, value)
|
|
setActivePaymentType(value)
|
|
}
|
|
|
|
return <>
|
|
|
|
|
|
<div className="card-header">
|
|
<div className="card-heading">
|
|
<h4 className="card-title">Select Payment Option</h4>
|
|
</div>
|
|
</div>
|
|
<div className="card-body">
|
|
|
|
<div className="form-check form-check-inline">
|
|
<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 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>
|
|
{/*<div className="card card-statistics"> </div>*/}
|
|
|
|
</>
|
|
|
|
} |