diff --git a/pages/index.tsx b/pages/index.tsx index 1cf2dbf29..5f4ebb217 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,5 @@ -import { ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout } from 'src/components/common'; +import { Banner, ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout } from 'src/components/common'; import { IconBuy } from 'src/components/icons'; export default function Home() { return ( @@ -13,11 +13,16 @@ export default function Home() { {/* demo */}
- +
+ }>Button - + ) } diff --git a/src/components/common/Banner/Banner.module.scss b/src/components/common/Banner/Banner.module.scss new file mode 100644 index 000000000..2fbd52c61 --- /dev/null +++ b/src/components/common/Banner/Banner.module.scss @@ -0,0 +1,38 @@ +@import "../../../styles/utilities"; + +.banner { + @apply bg-primary-light custom-border-radius-lg overflow-hidden; + border: 1px solid var(--primary); + + .inner { + @apply bg-no-repeat; + background-size: 90%; + background-position: right -500% bottom 0%; + @screen md { + @apply bg-right-bottom; + background-size: unset; + } + .content { + background-image: linear-gradient(to right, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.4) 90%, rgba(255, 255, 255, 0)); + padding: 1.6rem; + max-width: 70%; + @screen md { + max-width: 50%; + padding: 4.8rem; + } + .top { + .heading { + @apply heading-1; + margin-bottom: 1.6rem; + } + .subHeading { + @apply sub-headline; + } + } + + .bottom { + margin-top: 4rem; + } + } + } +} diff --git a/src/components/common/Banner/Banner.tsx b/src/components/common/Banner/Banner.tsx new file mode 100644 index 000000000..d85557cc5 --- /dev/null +++ b/src/components/common/Banner/Banner.tsx @@ -0,0 +1,44 @@ +import Link from 'next/link' +import React, { memo } from 'react' +import { IconArrowRight } from 'src/components/icons' +import { ROUTE } from 'src/utils/constanst.utils' +import { LANGUAGE } from 'src/utils/language.utils' +import ButtonCommon from '../ButtonCommon/ButtonCommon' +import s from './Banner.module.scss' + +interface Props { + imgLink: string, + title: string, + subtitle: string, + buttonLabel?: string, + linkButton?: string, + onClick?: () => void, +} + +const Banner = memo(({ imgLink, title, subtitle, buttonLabel = LANGUAGE.BUTTON_LABEL.SHOP_NOW, linkButton = ROUTE.HOME }: Props) => { + return ( +
+
+
+
+

+ {title} +

+
+ {subtitle} +
+
+ +
+
+
+ ) +}) + +export default Banner diff --git a/src/components/common/index.ts b/src/components/common/index.ts index 916660192..7a0f464a2 100644 --- a/src/components/common/index.ts +++ b/src/components/common/index.ts @@ -7,3 +7,4 @@ export { default as Logo} from './Logo/Logo' export { default as Inputcommon} from './InputCommon/InputCommon' export { default as InputSearch} from './InputSearch/InputSearch' export { default as ButtonIconBuy} from './ButtonIconBuy/ButtonIconBuy' +export { default as Banner} from './Banner/Banner' diff --git a/src/components/icons/IconArrowRight.tsx b/src/components/icons/IconArrowRight.tsx new file mode 100644 index 000000000..f6d2fd609 --- /dev/null +++ b/src/components/icons/IconArrowRight.tsx @@ -0,0 +1,11 @@ +import React from 'react' + +const IconArrowRight = () => { + return ( + + + + ) +} + +export default IconArrowRight diff --git a/src/components/icons/index.ts b/src/components/icons/index.ts index c82e4fa76..a26adde71 100644 --- a/src/components/icons/index.ts +++ b/src/components/icons/index.ts @@ -1,3 +1,4 @@ export { default as IconBuy } from './IconBuy' export { default as IconSearch } from './IconSearch' +export { default as IconArrowRight } from './IconArrowRight' diff --git a/src/styles/_utilities.scss b/src/styles/_utilities.scss index 20093a1b2..63dd56281 100644 --- a/src/styles/_utilities.scss +++ b/src/styles/_utilities.scss @@ -3,6 +3,8 @@ font-size: 4.8rem; line-height: 5.6rem; letter-spacing: -0.03em; + font-weight: bold; + text-transform: uppercase; @screen md { font-size: 6.4rem; line-height: 8rem; @@ -13,6 +15,8 @@ font-size: 4rem; line-height: 4.8rem; letter-spacing: -0.02em; + font-weight: bold; + text-transform: uppercase; @screen md { font-size: 4.8rem; line-height: 5.6rem; @@ -23,6 +27,8 @@ font-size: 2.4rem; line-height: 3.2rem; letter-spacing: -0.01em; + font-weight: bold; + text-transform: uppercase; @screen md { font-size: 3.2rem; line-height: 4rem; @@ -92,6 +98,10 @@ border-radius: 60% 10% 60% 2%/ 10% 20% 10% 50%; } + .custom-border-radius-lg { + border-radius: 60% 2% 2% 2%/ 6% 50% 50% 50%; + } + .font-heading { font-family: var(--font-heading); } diff --git a/src/utils/constanst.utils.ts b/src/utils/constanst.utils.ts index 94f253622..defc74eba 100644 --- a/src/utils/constanst.utils.ts +++ b/src/utils/constanst.utils.ts @@ -1,3 +1,7 @@ export const KEY = { ENTER: 'Enter', } + +export const ROUTE = { + HOME: '/', +}