@apolitical/component-library 8.7.11 → 8.7.12-re.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  import type { CardProps } from './../cards.types';
2
- declare const Card: ({ id, className, buildCardData, buildMemberData, card, cta, gtmContext, handleCardClick, meta, }: CardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Card: ({ id, className, buildCardData, buildMemberData, card, cta, gtmContext, handleCardClick, meta, onClick, }: CardProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Card;
@@ -11,6 +11,8 @@ export interface ICardBlockProps {
11
11
  /** Additional classes to add to the card block */
12
12
  className?: string;
13
13
  focusCardIndex?: number;
14
+ /** A callback to run when the user clicks on the card */
15
+ onClick?: (link: string) => void;
14
16
  }
15
17
  declare const CardBlock: ({ cards, cardTypes, className, gtmContext, ...props }: ICardBlockProps) => import("react/jsx-runtime").JSX.Element;
16
18
  export default CardBlock;
@@ -104,6 +104,8 @@ export interface CardProps {
104
104
  /** If the browser should focus on this card */
105
105
  setFocus?: boolean;
106
106
  };
107
+ /** A callback to run when the user clicks on the card */
108
+ onClick?: (link: string) => void;
107
109
  }
108
110
  export interface CarouselTitleProps {
109
111
  /** The title text */
@@ -156,6 +158,8 @@ export interface IndividualCarouselProps extends BaseCarouselProps {
156
158
  cards: CardType[];
157
159
  /** The types for each card, from Contentful */
158
160
  cardTypes: CardContentType[];
161
+ /** A callback to run when the user clicks on the card */
162
+ onClick?: (link: string) => void;
159
163
  }
160
164
  export interface NarrowCardType {
161
165
  /** The image to use */