Skip to content

Commit

Permalink
Merge pull request #725 from sudhanshutech/click/card
Browse files Browse the repository at this point in the history
Add onclick to catalog card
  • Loading branch information
sudhanshutech authored Aug 28, 2024
2 parents 4ad6762 + 6190560 commit f6abad9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/custom/CatalogCard/CatalogCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type CatalogCardProps = {
cardWidth: string;
cardStyles: React.CSSProperties;
type: string;
onCardClick?: () => void;
};

export const ClassToIconMap = {
Expand All @@ -63,15 +64,16 @@ const CatalogCard: React.FC<CatalogCardProps> = ({
cardHeight,
cardWidth,
cardStyles,
cardLink
cardLink,
onCardClick
}) => {
const outerStyles = {
height: cardHeight,
width: cardWidth,
...cardStyles
};
return (
<DesignCardUrl href={cardLink} target="_blank" rel="noreferrer">
<DesignCardUrl href={cardLink} onClick={onCardClick} target="_blank" rel="noreferrer">
<DesignCard outerStyles={outerStyles}>
<DesignInnerCard className="innerCard">
<ClassWrap catalogClassName={pattern?.catalog_data?.content_class} />
Expand Down

0 comments on commit f6abad9

Please sign in to comment.