diff --git a/package.json b/package.json
index 387ca946b..60f049ce4 100644
--- a/package.json
+++ b/package.json
@@ -74,7 +74,6 @@
"prettier": "^2.3.0",
"typescript": "4.3.4"
},
-
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
"prettier --write",
diff --git a/pages/index.tsx b/pages/index.tsx
index 6552bbebc..e67d8048a 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1,31 +1,31 @@
-import { CarouselCommon, LabelCommon, Layout, QuanittyInput } from 'src/components/common'
+import { Banner, ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout } from 'src/components/common';
+import { IconBuy } from 'src/components/icons';
+import { HomeBanner } from 'src/components/modules/home';
+
-const dataTest = [{
- text: 1
-}, {
- text: 2
-}, {
- text: 3
-}, {
- text: 4
-}, {
- text: 5
-}, {
- text: 6
-}]
-const test = (props: { text: string }) =>
{props.text}
export default function Home() {
return (
<>
-
-
-
- SEEFOOT
- -15%
- Waitting
- Delivering
- Delivered
+
+ 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/assets/imgs/apple_pay.png b/src/assets/imgs/apple_pay.png
new file mode 100644
index 000000000..c2c915d66
Binary files /dev/null and b/src/assets/imgs/apple_pay.png differ
diff --git a/src/assets/imgs/gpay.png b/src/assets/imgs/gpay.png
new file mode 100644
index 000000000..55e5dfbae
Binary files /dev/null and b/src/assets/imgs/gpay.png differ
diff --git a/src/assets/imgs/mastercard.png b/src/assets/imgs/mastercard.png
new file mode 100644
index 000000000..fad380822
Binary files /dev/null and b/src/assets/imgs/mastercard.png differ
diff --git a/src/assets/imgs/visa.png b/src/assets/imgs/visa.png
new file mode 100644
index 000000000..1ba0cec4b
Binary files /dev/null and b/src/assets/imgs/visa.png differ
diff --git a/src/components/common/Banner/Banner.module.scss b/src/components/common/Banner/Banner.module.scss
new file mode 100644
index 000000000..4cec48628
--- /dev/null
+++ b/src/components/common/Banner/Banner.module.scss
@@ -0,0 +1,51 @@
+@import "../../../styles/utilities";
+
+.banner {
+ @apply bg-primary-light custom-border-radius-lg overflow-hidden;
+ @screen md {
+ border: 1px solid var(--primary);
+ }
+ &.large {
+ .inner {
+ @screen xl {
+ @apply bg-right-bottom;
+ background-size: unset;
+ }
+ }
+ }
+ .inner {
+ @apply bg-no-repeat;
+ background-size: 90%;
+ background-position: right -500% bottom 0%;
+ .content {
+ background-image: linear-gradient(
+ to right,
+ rgb(227, 242, 233, 0.9),
+ rgb(227, 242, 233, 0.5) 80%,
+ rgb(227, 242, 233, 0)
+ );
+ padding: 1.6rem;
+ max-width: 37rem;
+ @screen md {
+ max-width: 49.6rem;
+ padding: 4.8rem;
+ }
+ .top {
+ .heading {
+ @apply heading-1 font-heading;
+ margin-bottom: 1.6rem;
+ }
+ .subHeading {
+ @apply sub-headline;
+ @screen md {
+ @apply caption;
+ }
+ }
+ }
+
+ .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..a953052b6
--- /dev/null
+++ b/src/components/common/Banner/Banner.tsx
@@ -0,0 +1,48 @@
+import classNames from 'classnames'
+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,
+ size?: 'small' | 'large',
+}
+
+const Banner = memo(({ imgLink, title, subtitle, buttonLabel = LANGUAGE.BUTTON_LABEL.SHOP_NOW, linkButton = ROUTE.HOME, size = 'large' }: Props) => {
+ return (
+
+
+
+
+
+ {title}
+
+
+ {subtitle}
+
+
+
+
+
+
+ )
+})
+
+export default Banner
diff --git a/src/components/common/ButtonCommon/ButtonCommon.module.scss b/src/components/common/ButtonCommon/ButtonCommon.module.scss
index c9d390574..8dca7e684 100644
--- a/src/components/common/ButtonCommon/ButtonCommon.module.scss
+++ b/src/components/common/ButtonCommon/ButtonCommon.module.scss
@@ -11,6 +11,20 @@
cursor: not-allowed;
color: var(--disabled);
}
+ &:hover {
+ @apply shadow-md;
+ &:not(:disabled) {
+ filter: brightness(1.05);
+ }
+ }
+ &:focus {
+ outline: none;
+ filter: brightness(1.05);
+ }
+ &:focus-visible {
+ outline: 2px solid var(--text-active);
+ }
+
&.loading {
&::before {
content: "";
@@ -24,20 +38,6 @@
margin-right: 0.8rem;
}
}
- &:hover {
- @apply shadow-md;
- &:not(:disabled) {
- filter: brightness(1.05);
- }
- }
-
- &:focus {
- outline: none;
- filter: brightness(1.05);
- }
- &:focus-visible {
- outline: 2px solid var(--text-active);
- }
&.light {
@apply text-base bg-white;
@@ -60,8 +60,18 @@
}
}
+ &.onlyIcon {
+ padding: 0.8rem;
+ .icon {
+ margin: 0;
+ }
+ }
+
&.large {
padding: 3.2rem 4.8rem;
+ &.onlyIcon {
+ padding: 1.6rem;
+ }
&.loading {
&::before {
width: 2.4rem;
@@ -70,6 +80,8 @@
}
}
+
+
&.preserve {
flex-direction: row-reverse;
.icon {
@@ -79,6 +91,10 @@
.icon {
margin: 0 1.6rem 0 0;
+ }
+
+ .label,
+ .icon {
svg path {
fill: currentColor;
}
diff --git a/src/components/common/ButtonCommon/ButtonCommon.tsx b/src/components/common/ButtonCommon/ButtonCommon.tsx
index 920736ef2..385b35077 100644
--- a/src/components/common/ButtonCommon/ButtonCommon.tsx
+++ b/src/components/common/ButtonCommon/ButtonCommon.tsx
@@ -6,15 +6,15 @@ interface Props {
children?: React.ReactNode,
type?: 'primary' | 'light' | 'ghost',
size?: 'default' | 'large',
- icon?: any,
+ icon?: React.ReactNode,
isIconSuffix?: boolean,
loading?: boolean,
disabled?: boolean,
onClick?: () => void,
}
-const ButtonCommon = memo(({ type = 'primary', size = 'default',
- icon, loading, disabled, isIconSuffix, children, onClick }: Props) => {
+const ButtonCommon = memo(({ type = 'primary', size = 'default', loading = false, isIconSuffix = false,
+ icon, disabled, children, onClick }: Props) => {
return (