From 7d55bbf46e49a375575303f16ec393462c6c573d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Aug 2021 18:30:33 +0700 Subject: [PATCH] refactor: edit classname and export icon --- .gitignore | 1 + pages/index.tsx | 31 +++++++++++++++---- .../ItemWishList/ItemWishList.module.scss | 1 - src/components/common/Logo/Logo.module.scss | 5 +-- .../ViewAllItem/ViewAllItem.module.scss | 4 +-- .../common/ViewAllItem/ViewAllItem.tsx | 4 +-- src/components/common/index.ts | 3 +- src/components/icons/index.ts | 2 ++ 8 files changed, 37 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 22f1bf4f3..61386b73c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules /.pnp .pnp.js +package-lock.json # testing /coverage diff --git a/pages/index.tsx b/pages/index.tsx index 7b6346860..539a8c74a 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,7 +1,27 @@ -import { ButtonCommon, Layout, ViewAllItem, ItemWishList, Logo } from 'src/components/common' +import { ButtonCommon, Layout, ViewAllItem, ItemWishList, Logo, SelectCommon } from 'src/components/common' import { IconBuy } from 'src/components/icons' -import { ButonType, ButtonSize } from 'src/utils/constanst.utils' +import { ButonType, ButtonSize, } from 'src/utils/constanst.utils' + +const OPTION_SORT = [ + { + name: 'By Name', + }, + { + name: 'Price (Hight to Low)', + }, + { + name: 'On Sale', + } +] +const OPTION_STATES = [ + { + name: 'Việt Nam' + }, + { + name: 'US' + }, +] export default function Home() { return ( <> @@ -14,11 +34,10 @@ export default function Home() { } disabled isIconSuffix={true}>Button with icon disabled } type={ButonType.light}>Button with icon - + -

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!

+ + ) } diff --git a/src/components/common/ItemWishList/ItemWishList.module.scss b/src/components/common/ItemWishList/ItemWishList.module.scss index 973ff5af9..9e2b07361 100644 --- a/src/components/common/ItemWishList/ItemWishList.module.scss +++ b/src/components/common/ItemWishList/ItemWishList.module.scss @@ -3,7 +3,6 @@ cursor: pointer; width: 2.4rem; height: 2.4rem; - } .isToggleOn{ svg path{ diff --git a/src/components/common/Logo/Logo.module.scss b/src/components/common/Logo/Logo.module.scss index 37662269c..83eb27516 100644 --- a/src/components/common/Logo/Logo.module.scss +++ b/src/components/common/Logo/Logo.module.scss @@ -10,7 +10,8 @@ margin-right: 1.2rem; } .conTent{ - @apply font-logo sub-headline; - font-size: var(--font-size); + @apply font-logo; + line-height: 3.2rem; + letter-spacing: -0.02rem; } } \ No newline at end of file diff --git a/src/components/common/ViewAllItem/ViewAllItem.module.scss b/src/components/common/ViewAllItem/ViewAllItem.module.scss index 41545b380..cefa0973b 100644 --- a/src/components/common/ViewAllItem/ViewAllItem.module.scss +++ b/src/components/common/ViewAllItem/ViewAllItem.module.scss @@ -3,11 +3,11 @@ .viewAll{ display: flex; color: theme("colors.primary"); - .conTent{ + .content{ margin: 0.8rem 0.8rem 0.8rem 1.6rem; font-weight: bold; } - .vecTor{ + .vector{ margin: 0.8rem 0rem 0.8rem 0rem; svg path{ fill: theme("colors.primary"); diff --git a/src/components/common/ViewAllItem/ViewAllItem.tsx b/src/components/common/ViewAllItem/ViewAllItem.tsx index 5472525ac..1a3171e7b 100644 --- a/src/components/common/ViewAllItem/ViewAllItem.tsx +++ b/src/components/common/ViewAllItem/ViewAllItem.tsx @@ -10,11 +10,11 @@ const ViewAllItem = ({ link }: Props) => { return(
- + View All -
+
diff --git a/src/components/common/index.ts b/src/components/common/index.ts index 8144b0de0..ef4aace92 100644 --- a/src/components/common/index.ts +++ b/src/components/common/index.ts @@ -3,4 +3,5 @@ export { default as Layout } from './Layout/Layout' export { default as Head } from './Head/Head' export { default as ViewAllItem} from './ViewAllItem/ViewAllItem' export { default as ItemWishList} from './ItemWishList/ItemWishList' -export { default as Logo} from './Logo/Logo' \ No newline at end of file +export { default as Logo} from './Logo/Logo' +export { default as SelectCommon} from './SelectCommon/SelectCommon' \ No newline at end of file diff --git a/src/components/icons/index.ts b/src/components/icons/index.ts index 155948269..74f5ca62f 100644 --- a/src/components/icons/index.ts +++ b/src/components/icons/index.ts @@ -1 +1,3 @@ export { default as IconBuy } from './IconBuy' +export { default as IconHeart } from './IconHeart' +export { default as IconVector } from './IconVector' \ No newline at end of file