4
0
forked from crowetic/commerce
Gonzalo Pozzo 1720bd698c
Implement custom checkout (#487)
* Implement custom checkout core

* Fix elements on core

* Add files to providers

* Adapt providers

* Update types

* Update shopify file

* Format files
2021-09-22 19:20:58 -05:00

29 lines
849 B
TypeScript

import { FC } from 'react'
import s from './PaymentWidget.module.css'
import { ChevronRight, CreditCard, Check } from '@components/icons'
interface ComponentProps {
onClick?: () => any
isValid?: boolean
}
const PaymentWidget: FC<ComponentProps> = ({ onClick, isValid }) => {
/* Shipping Address
Only available with checkout set to true -
This means that the provider does offer checkout functionality. */
return (
<div onClick={onClick} className={s.root}>
<div className="flex flex-1 items-center">
<CreditCard className="w-5 flex" />
<span className="ml-5 text-sm text-center font-medium">
Add Payment Method
</span>
{/* <span>VISA #### #### #### 2345</span> */}
</div>
<div>{isValid ? <Check /> : <ChevronRight />}</div>
</div>
)
}
export default PaymentWidget