mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
Merge pull request #28 from KieIO/m6-tan
M6 tan DeliveryAndPolicyPage DeliveryAndPolicyContent
This commit is contained in:
12
pages/privacy-policy.tsx
Normal file
12
pages/privacy-policy.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { Layout } from "src/components/common"
|
||||||
|
import { DeliveryAndPolicyContent, DeliveryAndPolicyBreadCrumb } from "src/components/modules/delivery-policy"
|
||||||
|
|
||||||
|
export default function DeliveryAndPolicyPage () {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<DeliveryAndPolicyBreadCrumb />
|
||||||
|
<DeliveryAndPolicyContent />
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
DeliveryAndPolicyPage.Layout = Layout
|
@@ -15,4 +15,4 @@ const BreadcrumbItem = ({ text, href }: BreadcrumbItemProps) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BreadcrumbItem
|
export default BreadcrumbItem
|
@@ -52,7 +52,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.contentContainer {
|
.contentContainer {
|
||||||
@apply hidden pb-16;
|
@apply hidden pb-16 whitespace-pre-line;
|
||||||
|
padding-top: 1.6rem;
|
||||||
}
|
}
|
||||||
@keyframes ContentAnimationIn {
|
@keyframes ContentAnimationIn {
|
||||||
0% {
|
0% {
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
import s from './CollapseChild.module.scss'
|
import s from './CollapseChild.module.scss'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import CollapseContent from './CollapseContent/CollapseContent'
|
|
||||||
|
|
||||||
interface CollapseProps{
|
interface CollapseProps{
|
||||||
title?: string,
|
title?: string,
|
||||||
content: Array<string>,
|
content: string,
|
||||||
isToggle?: boolean,
|
isToggle?: boolean,
|
||||||
}
|
}
|
||||||
const CollapseChild = ({title, content, isToggle=false}: CollapseProps) => {
|
const CollapseChild = ({title, content, isToggle=false}: CollapseProps) => {
|
||||||
@@ -26,9 +25,7 @@ const CollapseChild = ({title, content, isToggle=false}: CollapseProps) => {
|
|||||||
<div className={s.toggle}></div>
|
<div className={s.toggle}></div>
|
||||||
</div>
|
</div>
|
||||||
<div className={s.contentContainer}>
|
<div className={s.contentContainer}>
|
||||||
{
|
{content}
|
||||||
content.map(item => <CollapseContent key={item} content={item} />)
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
.content {
|
|
||||||
margin-top: 1.6rem;
|
|
||||||
}
|
|
@@ -1,15 +0,0 @@
|
|||||||
import s from './CollapseContent.module.scss'
|
|
||||||
|
|
||||||
interface CollapseContentProps{
|
|
||||||
content: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const CollapseContent = ({content}: CollapseContentProps) => {
|
|
||||||
return (
|
|
||||||
<div className={s.content}>
|
|
||||||
{content}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default CollapseContent
|
|
@@ -1,15 +1,15 @@
|
|||||||
import CollapseChild from './CollapseChild/CollapseChild'
|
import CollapseChild from './CollapseChild/CollapseChild'
|
||||||
|
|
||||||
interface CollapseCommonProps{
|
interface CollapseCommonProps{
|
||||||
data: {title: string, content: Array<string>}[],
|
data: {title: string, content: string}[],
|
||||||
}
|
}
|
||||||
|
|
||||||
const CollapseCommon = ({data}: CollapseCommonProps) => {
|
const CollapseCommon = ({data}: CollapseCommonProps) => {
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
{
|
{
|
||||||
data.map(item =>
|
data.map((item,index) =>
|
||||||
<CollapseChild key={item.title} title={item.title} content={item.content}/>
|
<CollapseChild key={`${item.title}-${index}`} title={item.title} content={item.content} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
|
@@ -48,7 +48,7 @@ const FOOTER_COLUMNS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Privacy Policy',
|
name: 'Privacy Policy',
|
||||||
link: ROUTE.TERM_CONDITION,
|
link: ROUTE.PRIVACY_POLICY,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Blog',
|
name: 'Blog',
|
||||||
|
@@ -38,6 +38,7 @@ export { default as CollapseCommon} from './CollapseCommon/CollapseCommon'
|
|||||||
export { default as BreadcrumbCommon } from './BreadcrumbCommon/BreadcrumbCommon'
|
export { default as BreadcrumbCommon } from './BreadcrumbCommon/BreadcrumbCommon'
|
||||||
export { default as ImgWithLink} from './ImgWithLink/ImgWithLink'
|
export { default as ImgWithLink} from './ImgWithLink/ImgWithLink'
|
||||||
export { default as RecipeDetail} from './RecipeDetail/RecipeDetail'
|
export { default as RecipeDetail} from './RecipeDetail/RecipeDetail'
|
||||||
|
export { default as BreadcrumbCommon} from './BreadcrumbCommon/BreadcrumbCommon'
|
||||||
export { default as DrawerCommon} from './DrawerCommon/DrawerCommon'
|
export { default as DrawerCommon} from './DrawerCommon/DrawerCommon'
|
||||||
export { default as CartDrawer} from './CartDrawer/CartDrawer'
|
export { default as CartDrawer} from './CartDrawer/CartDrawer'
|
||||||
export { default as StaticImage} from './StaticImage/StaticImage'
|
export { default as StaticImage} from './StaticImage/StaticImage'
|
||||||
|
@@ -28,4 +28,4 @@ export { default as IconLocation } from './IconLocation'
|
|||||||
export { default as IconClose } from './IconClose'
|
export { default as IconClose } from './IconClose'
|
||||||
export { default as IconDelete } from './IconDelete'
|
export { default as IconDelete } from './IconDelete'
|
||||||
export { default as IconPlus } from './IconPlus'
|
export { default as IconPlus } from './IconPlus'
|
||||||
export { default as IconMinus } from './IconMinus'
|
export { default as IconMinus } from './IconMinus'
|
@@ -0,0 +1,8 @@
|
|||||||
|
@import "../../../../styles/utilities";
|
||||||
|
|
||||||
|
.breadCrumb {
|
||||||
|
@apply absolute z-10 pt-12 spacing-horizontal;
|
||||||
|
@screen lg{
|
||||||
|
padding-left: 3.2rem;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,17 @@
|
|||||||
|
import { BreadcrumbCommon } from 'src/components/common'
|
||||||
|
import s from './DeliveryAndPolicyBreadCrumb.module.scss'
|
||||||
|
|
||||||
|
const CRUMB_DATA = [
|
||||||
|
{
|
||||||
|
link: "/delivery-policy",
|
||||||
|
name: "Delivery And Policy"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const DeliveryAndPolicyBreadCrumb = () => {
|
||||||
|
return (
|
||||||
|
<section className={s.breadCrumb}>
|
||||||
|
<BreadcrumbCommon crumbs={CRUMB_DATA}/>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default DeliveryAndPolicyBreadCrumb
|
@@ -0,0 +1,26 @@
|
|||||||
|
@import "../../../../styles/utilities";
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
@apply flex justify-center pt-20 pb-28 spacing-horizontal;
|
||||||
|
.deliveryAndPolicyContentWrapper {
|
||||||
|
max-width: 80.4rem;
|
||||||
|
min-height: 4rem;
|
||||||
|
.titleWrapper {
|
||||||
|
@apply flex flex-col items-start;
|
||||||
|
.date {
|
||||||
|
@apply inline flex flex-row;
|
||||||
|
margin-bottom: 0.4rem;
|
||||||
|
.update {
|
||||||
|
@apply uppercase leading-8;
|
||||||
|
color:var(--text-label);
|
||||||
|
font-size: 1.2rem;
|
||||||
|
letter-spacing: 0.01em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
@apply pb-16 whitespace-pre-line;
|
||||||
|
padding-top: 1.6rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1,22 +1,77 @@
|
|||||||
import { DateTime } from 'src/components/common'
|
import { CollapseCommon, DateTime, HeadingCommon } from 'src/components/common'
|
||||||
import s from './DeliveryAndPolicyContent.module.scss'
|
import s from './DeliveryAndPolicyContent.module.scss'
|
||||||
|
|
||||||
interface DeliveryAndPolicyContentProps{
|
interface DeliveryAndPolicyContentProps{
|
||||||
title?: string,
|
title?: string,
|
||||||
date: string,
|
date?: string,
|
||||||
content: string[],
|
content?: string,
|
||||||
}
|
}
|
||||||
|
const HEADER_CONTENT =
|
||||||
|
`When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.
|
||||||
|
|
||||||
const DeliveryAndPolicyContent = ( { title, date, content } : DeliveryAndPolicyContentProps) => {
|
Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.
|
||||||
|
|
||||||
|
This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.`;
|
||||||
|
|
||||||
|
const DELIVERYANDPOLICY_DATA = [
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: `When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.
|
||||||
|
|
||||||
|
Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.
|
||||||
|
|
||||||
|
This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: `When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.
|
||||||
|
|
||||||
|
Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.
|
||||||
|
|
||||||
|
This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: `When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.
|
||||||
|
|
||||||
|
Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.
|
||||||
|
|
||||||
|
This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: `When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.
|
||||||
|
|
||||||
|
Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.
|
||||||
|
|
||||||
|
This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "This is a subtitle",
|
||||||
|
content: `When you’re trying to eat healthier but want something more substantial than a leafy green salad, broccoli salad is there for you. I love the crunch and heft of broccoli, especially when it’s cut up into bite size spoonable pieces.
|
||||||
|
|
||||||
|
Some people aren’t into raw broccoli, but I love it! I always go for the raw broccoli on those vegetable platters that seem to be at every potluck/party you go to.
|
||||||
|
|
||||||
|
This is a simple broccoli salad: you have the bulk of it, raw broccoli; crunchy red onions for a bit of acidity and raw crunch, craisins for sweetness, almonds for a nutty counter point; and a sweet and tangy soy-rice vinegar-sesame dressing.`,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
const DeliveryAndPolicyContent = ( { title="Delivery & Policy", date="APRIL 30, 2021", content = HEADER_CONTENT } : DeliveryAndPolicyContentProps) => {
|
||||||
return (
|
return (
|
||||||
<section>
|
<section className={s.wrapper}>
|
||||||
<div className={s.titleWrapper}>
|
|
||||||
<div>LASTEST UPDATED:
|
<div className={s.deliveryAndPolicyContentWrapper}>
|
||||||
<DateTime date={date} />
|
<div className={s.titleWrapper}>
|
||||||
|
<div className={s.date}>
|
||||||
|
<div className={s.update}>LASTEST UPDATED: </div>
|
||||||
|
<DateTime date={date} />
|
||||||
|
</div>
|
||||||
|
<HeadingCommon>{title}</HeadingCommon>
|
||||||
</div>
|
</div>
|
||||||
<div className={s.title}>
|
<div className={s.content}>
|
||||||
{title}
|
{content}
|
||||||
</div>
|
</div>
|
||||||
|
<CollapseCommon data={DELIVERYANDPOLICY_DATA} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@@ -1 +1,2 @@
|
|||||||
export { default as DeliveryAndPolicyContent} from './DeliveryAndPolicyContent/DeliveryAndPolicyContent'
|
export { default as DeliveryAndPolicyContent } from './DeliveryAndPolicyContent/DeliveryAndPolicyContent'
|
||||||
|
export { default as DeliveryAndPolicyBreadCrumb } from './DeliveryAndPolicyBreadCrumb/DeliveryAndPolicyBreadCrumb'
|
Reference in New Issue
Block a user