diff --git a/pages/index.tsx b/pages/index.tsx index e67d8048a..a33798926 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,31 +1,13 @@ -import { Banner, ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout } from 'src/components/common'; -import { IconBuy } from 'src/components/icons'; -import { HomeBanner } from 'src/components/modules/home'; +import { Layout } from 'src/components/common'; +import { HomeBanner, HomeCTA } from 'src/components/modules/home'; export default function Home() { return ( <> -
This is home page
-

Go to pages/index.tsx to get your hand dirty!

-

Go to src/components to make your awesome component!

-

Go to src/styles to find global styles!

- - {/* demo */} -
- - -
- }>Button - - - + ) } diff --git a/src/components/common/ButtonCommon/ButtonCommon.module.scss b/src/components/common/ButtonCommon/ButtonCommon.module.scss index 8dca7e684..2a471bec6 100644 --- a/src/components/common/ButtonCommon/ButtonCommon.module.scss +++ b/src/components/common/ButtonCommon/ButtonCommon.module.scss @@ -68,7 +68,7 @@ } &.large { - padding: 3.2rem 4.8rem; + padding: 1.6rem 4.8rem; &.onlyIcon { padding: 1.6rem; } diff --git a/src/components/modules/home/HomeCTA/HomeCTA.module.scss b/src/components/modules/home/HomeCTA/HomeCTA.module.scss new file mode 100644 index 000000000..c82063bc0 --- /dev/null +++ b/src/components/modules/home/HomeCTA/HomeCTA.module.scss @@ -0,0 +1,27 @@ +@import "../../../../styles/utilities"; + +.homeCTA { + @apply spacing-horizontal; + .inner { + @apply flex justify-between items-center bg-primary-light; + background-image: url('./assets/bg_home_cta.png'); + background-repeat: no-repeat; + background-size: cover; + background-position: center top; + border-radius: 2.4rem; + padding: 2rem; + @screen md { + padding-left: 9rem; + padding-right: 4.8rem; + min-height: 18rem; + } + .text { + .heading { + @apply heading-1 font-heading text-primary; + } + .sub { + @apply font-bold sm-headline; + } + } + } +} diff --git a/src/components/modules/home/HomeCTA/HomeCTA.tsx b/src/components/modules/home/HomeCTA/HomeCTA.tsx new file mode 100644 index 000000000..f1d4c2c63 --- /dev/null +++ b/src/components/modules/home/HomeCTA/HomeCTA.tsx @@ -0,0 +1,31 @@ +import Link from 'next/link' +import React from 'react' +import { ButtonCommon } from 'src/components/common' +import { ROUTE } from 'src/utils/constanst.utils' +import { LANGUAGE } from 'src/utils/language.utils' +import s from './HomeCTA.module.scss' + +interface Props { + className?: string + children?: any +} + +const HomeCTA = ({ }: Props) => { + return ( +
+
+
+

SALE 70%

+
for Vegetarian Day
+
+ + + {LANGUAGE.BUTTON_LABEL.SHOP_NOW} + + +
+
+ ) +} + +export default HomeCTA diff --git a/src/components/modules/home/HomeCTA/assets/bg_home_cta.png b/src/components/modules/home/HomeCTA/assets/bg_home_cta.png new file mode 100644 index 000000000..df3f64632 Binary files /dev/null and b/src/components/modules/home/HomeCTA/assets/bg_home_cta.png differ diff --git a/src/components/modules/home/index.ts b/src/components/modules/home/index.ts index a83854f9f..e65d4e0c1 100644 --- a/src/components/modules/home/index.ts +++ b/src/components/modules/home/index.ts @@ -1 +1,2 @@ export { default as HomeBanner } from './HomeBanner/HomeBanner' +export { default as HomeCTA } from './HomeCTA/HomeCTA' diff --git a/tailwind.config.js b/tailwind.config.js index c9e77ec87..98b4a8e69 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -44,14 +44,14 @@ module.exports = { 'negative': 'var(--negative)', 'negative-border-line': 'var(--negative-border-line)', 'negative-light': 'var(--negative-light)', - - 'disabled': 'var(--text-disabled)', + line: 'var(--border-line)', background: 'var(--background)', white: 'var(--white)', - 'background-arrow':'var(--background-arrow)', gray: 'var(--gray)', disabled: 'var(--text-disabled)', + 'background-arrow':'var(--background-arrow)', + // @deprecated (NOT use these variables) 'primary-2': 'var(--primary-2)',