🔨 refactor: checkout

:%s
This commit is contained in:
unknown
2021-09-07 14:41:53 +07:00
parent 267d7918fa
commit 859f645c03
15 changed files with 69 additions and 54 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react'
import s from "./CardItemCheckout.module.scss"
import { ProductProps } from 'src/utils/types.utils'
interface CardItemCheckoutProps extends ProductProps {
export interface CardItemCheckoutProps extends ProductProps {
quantity:number
}

View File

@@ -0,0 +1,9 @@
.warpper{
max-width: 56.3rem;
@apply flex justify-between flex-col;
.bot{
.promo{
padding: 3.2rem;
}
}
}

View File

@@ -0,0 +1,30 @@
import React from 'react'
import s from "./CheckoutBill.module.scss"
import { CardItemCheckout } from '..'
import { CardItemCheckoutProps } from '../CardItemCheckout/CardItemCheckout'
interface CheckoutBillProps {
data: CardItemCheckoutProps[]
}
const CheckoutBill = ({data}: CheckoutBillProps) => {
return (
<div className={s.warpper}>
<div className={s.list}>
{data.map((item,index)=>{
return <CardItemCheckout {...item} key={index}/>
})}
</div>
<div className={s.bot}>
<div className={s.promo}>
</div>
<div className={s.price}>
</div>
</div>
</div>
)
}
export default CheckoutBill

View File

@@ -1,4 +1,4 @@
@import "../../../../../styles/utilities";
@import "../../../styles/utilities";
.warpper{
@apply u-form;
padding: 0 5.6rem;

View File

@@ -1,13 +1,13 @@
import React from 'react'
import TabCommon from 'src/components/common/TabCommon/TabCommon'
interface PaymentInfoFormProps {
}
const PaymentInfoForm = (props: PaymentInfoFormProps) => {
const PaymentInfoForm = ({}: PaymentInfoFormProps) => {
return (
<div>
</div>
)
}

View File

@@ -1,4 +1,5 @@
@import "../../../../../styles/utilities";
@import "../../../styles/utilities";
.warpper{
@apply u-form;
padding: 0 5.6rem;

View File

@@ -37,3 +37,7 @@ export { default as CardItemCheckout} from './CardItemCheckout/CardItemCheckout'
export { default as CardBlog} from './CardBlog/CardBlog'
export { default as RelevantBlogPosts} from './RelevantBlogPosts/RelevantBlogPosts'
export { default as CollapseCommon} from './CollapseCommon/CollapseCommon'
export { default as CheckoutBill} from './CheckoutBill/CheckoutBill'
export { default as CustomerInfoForm} from './CustomerInfoForm/CustomerInfoForm'
export { default as ShippingInfoForm} from './ShippingInfoForm/ShippingInfoForm'
export { default as PaymentInfoForm} from './PaymentInfoForm/PaymentInfoForm'

View File

@@ -1,23 +0,0 @@
import React from 'react'
import s from "CheckoutBill.module.scss"
interface CheckoutBillProps {
}
const CheckoutBill = ({}: CheckoutBillProps) => {
return (
<div className={s.warpper}>
<div className={s.list}>
</div>
<div className={s.promo}>
</div>
<div className={s.price}>
</div>
</div>
)
}
export default CheckoutBill