refactor: add Icon prelix into filename Heart and Vector in common/icons

This commit is contained in:
unknown 2021-08-24 15:26:37 +07:00
parent 51ab7637f1
commit 73c8e0ce66
5 changed files with 10 additions and 10 deletions

View File

@ -8,11 +8,11 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
path{ path{
stroke: theme("colors.negative"); fill: theme("colors.negative");
} }
} }
.isToggleOn{ .isToggleOn{
path{ path{
stroke: theme("colors.primary"); fill: theme("colors.primary");
} }
} }

View File

@ -1,5 +1,5 @@
import classNames from 'classnames' import classNames from 'classnames'
import { Heart } from '@components/icons' import IconHeart from 'src/components/icons/IconHeart'
import React, { memo } from 'react' import React, { memo } from 'react'
import s from './ItemWishList.module.scss' import s from './ItemWishList.module.scss'
@ -18,7 +18,7 @@ const ItemWishList = memo(({isActive, onClick}:Props) => {
[s.isToggleOn]:isActive [s.isToggleOn]:isActive
})} })}
onClick={handleClick}> onClick={handleClick}>
<Heart /> <IconHeart />
</div> </div>
) )
}) })

View File

@ -1,4 +1,4 @@
import Vector from 'src/components/icons/Vector' import IconVector from 'src/components/icons/IconVector'
import s from './ViewAllItem.module.scss' import s from './ViewAllItem.module.scss'
import Link from 'next/link' import Link from 'next/link'
@ -17,7 +17,7 @@ const ViewAllItem = ({ link }: Props) => {
</a> </a>
</Link> </Link>
<div className={s.vecTor}> <div className={s.vecTor}>
<Vector /> <IconVector />
</div> </div>
</div> </div>
) )

View File

@ -1,5 +1,5 @@
const Vector = ({ ...props }) => { const IconHeart = ({ ...props }) => {
return ( return (
<svg <svg
width="24" width="24"
@ -16,4 +16,4 @@ const Vector = ({ ...props }) => {
) )
} }
export default Vector export default IconHeart

View File

@ -1,5 +1,5 @@
const Vector = ({ ...props }) => { const IconVector = ({ ...props }) => {
return ( return (
<svg <svg
width="24" width="24"
@ -16,4 +16,4 @@ const Vector = ({ ...props }) => {
) )
} }
export default Vector export default IconVector