@aic-kits/react 0.3.1 → 0.4.4

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,5 @@
1
1
  import { default as React } from 'react';
2
+ import { Size } from '../../theme/common';
2
3
  import { BoxProps } from '../Box';
3
4
  export interface BaseArtProps extends BoxProps {
4
5
  /**
@@ -8,7 +9,7 @@ export interface BaseArtProps extends BoxProps {
8
9
  /**
9
10
  * Height of the art
10
11
  */
11
- height?: string | number;
12
+ height?: Size | string | number;
12
13
  /**
13
14
  * Testing id of the component
14
15
  */
@@ -50,7 +51,7 @@ export interface SvgArtProps extends BaseArtProps {
50
51
  /**
51
52
  * SVG content
52
53
  */
53
- art: string;
54
+ art: React.FunctionComponent<React.SVGAttributes<SVGElement>> | string;
54
55
  }
55
56
  export interface ImageArtProps extends BaseArtProps {
56
57
  /**
@@ -1,4 +1,4 @@
1
- import { Size, Theme } from '../../theme';
1
+ import { Theme, Size } from '../../theme';
2
2
  /**
3
3
  * Helper function to get the actual size value from theme or direct input.
4
4
  */
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
- import { NavItem } from './types';
2
+ import { NavItemProps } from './types';
3
3
  interface HeaderNavProps {
4
- navItems?: NavItem[];
5
- onNavItemClick?: (item: NavItem) => void;
4
+ navItems?: NavItemProps[];
5
+ onNavItemClick?: (item: NavItemProps) => void;
6
6
  }
7
7
  export declare const HeaderNav: React.FC<HeaderNavProps>;
8
8
  export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { NavItemProps } from './types';
3
+ export declare const NavItem: React.FC<NavItemProps>;
@@ -1,18 +1,18 @@
1
1
  import { Color } from '../../theme';
2
2
  import { BoxProps } from '../Box';
3
- export interface NavItem {
3
+ export interface NavItemProps {
4
4
  /**
5
5
  * Label for the navigation item
6
6
  */
7
7
  label: string;
8
- /**
9
- * URL or path for the navigation item
10
- */
11
- path: string;
12
8
  /**
13
9
  * Whether this navigation item is currently active
14
10
  */
15
11
  isActive?: boolean;
12
+ /**
13
+ * Called when the navigation item is clicked
14
+ */
15
+ onClick?: () => void;
16
16
  }
17
17
  export interface HeaderProps extends BoxProps {
18
18
  /**
@@ -22,7 +22,7 @@ export interface HeaderProps extends BoxProps {
22
22
  /**
23
23
  * Navigation items to display in the center of the header
24
24
  */
25
- navItems?: NavItem[];
25
+ navItems?: NavItemProps[];
26
26
  /**
27
27
  * Whether to show the user is signed in
28
28
  */
@@ -41,7 +41,7 @@ export interface HeaderProps extends BoxProps {
41
41
  /**
42
42
  * Called when a navigation item is clicked
43
43
  */
44
- onNavItemClick?: (item: NavItem) => void;
44
+ onNavItemClick?: (item: NavItemProps) => void;
45
45
  /**
46
46
  * Called when the sign in button is clicked
47
47
  */