diff --git a/src/components/common/CollapseCommon/CollapseChild/CollapseChild.module.scss b/src/components/common/CollapseCommon/CollapseChild/CollapseChild.module.scss index e6a71e44e..0a0b3b665 100644 --- a/src/components/common/CollapseCommon/CollapseChild/CollapseChild.module.scss +++ b/src/components/common/CollapseCommon/CollapseChild/CollapseChild.module.scss @@ -53,6 +53,7 @@ } .contentContainer { @apply hidden pb-16; + padding-top: 1.6rem; } @keyframes ContentAnimationIn { 0% { diff --git a/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx b/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx index 22cbcda10..397b0dcda 100644 --- a/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx +++ b/src/components/common/CollapseCommon/CollapseChild/CollapseChild.tsx @@ -1,12 +1,11 @@ import s from './CollapseChild.module.scss' import { useState } from 'react' import classNames from 'classnames' -import CollapseContent from './CollapseContent/CollapseContent' import Link from 'next/link' interface CollapseProps{ title?: string, - content: Array, + content: string, isToggle?: boolean, link?: string, } @@ -30,9 +29,7 @@ const CollapseChild = ({title, content, isToggle=false, link="/"}: CollapseProps
- { - content.map(item => ) - } + {content}
) diff --git a/src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent.module.scss b/src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent.module.scss deleted file mode 100644 index 9e5cfba30..000000000 --- a/src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.content { - margin-top: 1.6rem; -} \ No newline at end of file diff --git a/src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent.tsx b/src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent.tsx deleted file mode 100644 index e18e19c0a..000000000 --- a/src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import s from './CollapseContent.module.scss' - -interface CollapseContentProps{ - content: string -} - -const CollapseContent = ({content}: CollapseContentProps) => { - return ( -
- {content} -
- ) -} - -export default CollapseContent \ No newline at end of file diff --git a/src/components/common/CollapseCommon/CollapseCommon.tsx b/src/components/common/CollapseCommon/CollapseCommon.tsx index 98030ffce..4f020ae90 100644 --- a/src/components/common/CollapseCommon/CollapseCommon.tsx +++ b/src/components/common/CollapseCommon/CollapseCommon.tsx @@ -1,15 +1,15 @@ import CollapseChild from './CollapseChild/CollapseChild' interface CollapseCommonProps{ - data: {title: string, content: Array, link: string}[], + data: {title: string, content: string, link: string}[], } const CollapseCommon = ({data}: CollapseCommonProps) => { return (
{ - data.map(item => - + data.map((item,index) => + ) }
diff --git a/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.module.scss b/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.module.scss index d122ecae2..d793dc3c7 100644 --- a/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.module.scss +++ b/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.module.scss @@ -18,8 +18,9 @@ } } } - .contentContainer { + .content { @apply pb-16; + padding-top: 1.6rem; } } } diff --git a/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.tsx b/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.tsx index 9faa5f81f..5a98e8853 100644 --- a/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.tsx +++ b/src/components/modules/delivery-policy/DeliveryAndPolicyContent/DeliveryAndPolicyContent.tsx @@ -1,58 +1,67 @@ import { CollapseCommon, DateTime, HeadingCommon } from 'src/components/common' -import CollapseContent from 'src/components/common/CollapseCommon/CollapseChild/CollapseContent/CollapseContent' import s from './DeliveryAndPolicyContent.module.scss' interface DeliveryAndPolicyContentProps{ title?: string, date?: string, - content?: Array, + 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.", - "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 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. + +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.", - ], + 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.`, link: "/title" }, { 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.", - ], + 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.`, link: "/title" }, { 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.", - ], + 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.`, link: "/title" }, { 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.", - ], + 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.`, link: "/title" - } + }, + { + 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.`, + link: "/title" + }, ] -const DeliveryAndPolicyContent = ( { title="Delivery & Policy", date="APRIL 30", content = HEADER_CONTENT } : DeliveryAndPolicyContentProps) => { +const DeliveryAndPolicyContent = ( { title="Delivery & Policy", date="APRIL 30, 2021", content = HEADER_CONTENT } : DeliveryAndPolicyContentProps) => { return (
@@ -64,10 +73,8 @@ const DeliveryAndPolicyContent = ( { title="Delivery & Policy", date="APRIL 30", {title} -
- { - content.map(item => ) - } +
+ {content}