@apolitical/component-library 3.5.21 → 3.5.22-beta.0

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.
@@ -8,6 +8,8 @@ interface Props {
8
8
  children: React.ReactNode | JSX.Element | string;
9
9
  /** An `href`, for links */
10
10
  href?: string;
11
+ /** An `onClick`, for buttons */
12
+ onClick?: (e: React.MouseEvent) => void;
11
13
  /** `for`, for labels */
12
14
  htmlFor?: string;
13
15
  /** Additional classes */
@@ -18,6 +20,8 @@ declare const _default: React.MemoExoticComponent<({ element, showOnFocus, child
18
20
  children: React.ReactNode | JSX.Element;
19
21
  /** An `href`, for links */
20
22
  href?: string | undefined;
23
+ /** An `onClick`, for buttons */
24
+ onClick?: ((e: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
21
25
  /** `for`, for labels */
22
26
  htmlFor?: string | undefined;
23
27
  }, HTMLElement>>;
@@ -47,6 +47,12 @@ export interface ButtonPropsType {
47
47
  target?: '_blank' | '_self' | '_parent' | '_top';
48
48
  /** The rel, for links */
49
49
  rel?: string;
50
+ /** ARIA expanded (for content that hide/shows on click) */
51
+ 'aria-expanded'?: boolean;
52
+ /** ARIA controls, if the button controls anything */
53
+ 'aria-controls'?: string;
54
+ /** ARIA pressed, if the button is a toggle, e.g. a like button */
55
+ 'aria-pressed'?: boolean;
50
56
  /** The GTM event type */
51
57
  'data-gtm-event-type'?: string;
52
58
  /** The GTM event context */
@@ -20,6 +20,8 @@ interface Props {
20
20
  disabled?: boolean;
21
21
  /** An ARIA label for the link */
22
22
  ariaLabel?: string;
23
+ /** Optional ARIA current state, for breadcrumbs */
24
+ 'aria-current'?: 'page' | 'location';
23
25
  /** Test id for link */
24
26
  'data-testid'?: string;
25
27
  /** Data attributes for the link */