Skip to content

Commit

Permalink
fix(cards): add clicked state on favorite icons
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo authored Oct 11, 2024
2 parents 2dfbcf5 + 2b21d96 commit d06b463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/content/Cards/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export const Card = ({
>
{showFavIcon && (
<Box
className="cx-card__icon"
className={`cx-card__icon ${addButtonClicked ? 'cx-card__icon--active' : 'cx-card__icon--inactive'}`}
sx={{
padding: '10px',
}}
Expand Down
3 changes: 1 addition & 2 deletions src/components/content/Cards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
********************************************************************************/

import { Box } from '@mui/material'
import uniqueId from 'lodash/uniqueId'
import { Card, type CardProps } from './Card'
import { CardAddService } from './CardAddService'

Expand Down Expand Up @@ -141,7 +140,7 @@ export const Cards = ({
<Card
{...settings}
{...item}
key={uniqueId('Cards')}
key={item.id}
onClick={() => {
onCardClick(item)
}}
Expand Down

0 comments on commit d06b463

Please sign in to comment.