refactor: edit classname and export icon

This commit is contained in:
unknown 2021-08-25 18:30:33 +07:00
parent a18eb2b320
commit 7d55bbf46e
8 changed files with 37 additions and 14 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
node_modules
/.pnp
.pnp.js
package-lock.json
# testing
/coverage

View File

@ -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() {
<ButtonCommon icon={<IconBuy/>} disabled isIconSuffix={true}>Button with icon disabled</ButtonCommon>
<ButtonCommon icon={<IconBuy/>} type={ButonType.light}>Button with icon</ButtonCommon>
<ViewAllItem link="/all"/>
<ItemWishList isActive={true} />
<ItemWishList />
<Logo />
<p>Go to <code>pages/index.tsx</code> to get your hand dirty!</p>
<p>Go to <code>src/components</code> to make your awesome component!</p>
<p>Go to <code>src/styles</code> to find global styles!</p>
<SelectCommon option={OPTION_SORT} placeHolder={"Sort By"}/>
<SelectCommon option={OPTION_STATES} placeHolder={"States"} type="custom" size="large"/>
</>
)
}

View File

@ -3,7 +3,6 @@
cursor: pointer;
width: 2.4rem;
height: 2.4rem;
}
.isToggleOn{
svg path{

View File

@ -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;
}
}

View File

@ -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");

View File

@ -10,11 +10,11 @@ const ViewAllItem = ({ link }: Props) => {
return(
<div className={s.viewAll}>
<Link href={link}>
<a className={s.conTent}>
<a className={s.content}>
View All
</a>
</Link>
<div className={s.vecTor}>
<div className={s.vector}>
<IconVector />
</div>
</div>

View File

@ -4,3 +4,4 @@ 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'
export { default as SelectCommon} from './SelectCommon/SelectCommon'

View File

@ -1 +1,3 @@
export { default as IconBuy } from './IconBuy'
export { default as IconHeart } from './IconHeart'
export { default as IconVector } from './IconVector'