mirror of
https://github.com/vercel/commerce.git
synced 2025-10-08 23:22:38 +00:00
.vscode
assets
components
auth
cart
checkout
CheckoutSidebarView
PaymentMethodView
PaymentWidget
ShippingView
ShippingWidget
ShippingWidget.module.css
ShippingWidget.tsx
index.ts
context.tsx
common
icons
product
ui
wishlist
search.tsx
config
framework
lib
pages
public
.editorconfig
.env.template
.eslintrc
.gitignore
.prettierignore
.prettierrc
README.md
codegen.bigcommerce.json
codegen.json
commerce.config.json
global.d.ts
license.md
next-env.d.ts
next.config.js
package-lock.json
package.json
postcss.config.js
swell-js.d.ts
tailwind.config.js
tsconfig.json
* Implement custom checkout core * Fix elements on core * Add files to providers * Adapt providers * Update types * Update shopify file * Format files
33 lines
931 B
TypeScript
33 lines
931 B
TypeScript
import { FC } from 'react'
|
|
import s from './ShippingWidget.module.css'
|
|
import { ChevronRight, MapPin, Check } from '@components/icons'
|
|
import cn from 'classnames'
|
|
|
|
interface ComponentProps {
|
|
onClick?: () => any
|
|
isValid?: boolean
|
|
}
|
|
|
|
const ShippingWidget: 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">
|
|
<MapPin className="w-5 flex" />
|
|
<span className="ml-5 text-sm text-center font-medium">
|
|
Add Shipping Address
|
|
</span>
|
|
{/* <span>
|
|
1046 Kearny Street.<br/>
|
|
San Franssisco, California
|
|
</span> */}
|
|
</div>
|
|
<div>{isValid ? <Check /> : <ChevronRight />}</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ShippingWidget
|