mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 12:11:22 +00:00
refactor: edit classname and export icon
This commit is contained in:
parent
a18eb2b320
commit
7d55bbf46e
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
package-lock.json
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
@ -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"/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
cursor: pointer;
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
|
||||
}
|
||||
.isToggleOn{
|
||||
svg path{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -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");
|
||||
|
@ -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>
|
||||
|
@ -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'
|
||||
export { default as Logo} from './Logo/Logo'
|
||||
export { default as SelectCommon} from './SelectCommon/SelectCommon'
|
@ -1 +1,3 @@
|
||||
export { default as IconBuy } from './IconBuy'
|
||||
export { default as IconHeart } from './IconHeart'
|
||||
export { default as IconVector } from './IconVector'
|
Loading…
x
Reference in New Issue
Block a user