@indico-data/design-system 2.45.2 → 2.45.3

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,4 +1,4 @@
1
- import { MouseEventHandler } from 'react';
1
+ import { MouseEventHandler, CSSProperties } from 'react';
2
2
  import { PermafrostComponent } from '../../types';
3
3
  import { IconName as FAIconName } from '@fortawesome/fontawesome-svg-core';
4
4
  import { indicons } from './indicons';
@@ -13,6 +13,6 @@ export type IconProps = PermafrostComponent & {
13
13
  name: IconName;
14
14
  ariaLabel?: string;
15
15
  size?: IconSizes;
16
- style?: React.CSSProperties;
16
+ style?: CSSProperties;
17
17
  onClick?: MouseEventHandler<SVGElement>;
18
18
  };
@@ -23,8 +23,9 @@ import {
23
23
  faQuestionCircle,
24
24
  faCopy,
25
25
  } from '@fortawesome/free-solid-svg-icons';
26
+ import { indiconDefinitions } from '@/components/icons/indicons';
26
27
 
27
- // Utility for registering FontAwesome icons
28
+ // Utility for registering Font Awesome icons
28
29
  export const registerFontAwesomeIcons = (...icons: IconDefinition[]) => {
29
30
  library.add(...icons);
30
31
  };
@@ -51,4 +52,7 @@ registerFontAwesomeIcons(
51
52
  faFileDownload,
52
53
  faQuestionCircle,
53
54
  faCopy,
55
+ // backwards compat, don't require registration of custom indicons
56
+ // might want to consider doing so in the future
57
+ ...indiconDefinitions,
54
58
  );
@@ -1,4 +1,4 @@
1
- // NOTE: This file imports the full list of FontAwesome icons, and is only intended for use in Storybook.
1
+ // NOTE: This file imports the full list of Font Awesome icons, and is only intended for use in Storybook.
2
2
  // Avoid importing this file into the design system code to keep bundle size at a minimum.
3
3
 
4
4
  import { fas } from '@fortawesome/free-solid-svg-icons';