mirror of
https://github.com/vercel/commerce.git
synced 2025-07-12 07:21:21 +00:00
24 lines
558 B
TypeScript
24 lines
558 B
TypeScript
import classNames from 'classnames'
|
|
import IconHeart from 'src/components/icons/IconHeart'
|
|
import React, { memo } from 'react'
|
|
import s from './ItemWishList.module.scss'
|
|
|
|
interface Props {
|
|
isActive?: boolean,
|
|
onChange?: () => void
|
|
}
|
|
|
|
const ItemWishList = memo(({isActive=false, onChange}:Props) => {
|
|
return(
|
|
<div className={classNames({
|
|
[s.heartToggle]: true,
|
|
[s.isToggleOn]: isActive
|
|
})}
|
|
onChange={onChange}
|
|
>
|
|
<IconHeart />
|
|
</div>
|
|
)
|
|
})
|
|
|
|
export default ItemWishList |