@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.
- package/dist/components/Art/types.d.ts +3 -2
- package/dist/components/Art/utils.d.ts +1 -1
- package/dist/components/Header/HeaderNav.d.ts +3 -3
- package/dist/components/Header/NavItem.d.ts +3 -0
- package/dist/components/Header/types.d.ts +7 -7
- package/dist/index.cjs +54 -46
- package/dist/index.js +1218 -1226
- package/dist/theme/common/sizes.d.ts +1 -1
- package/dist/theme/getTheme.d.ts +2 -1
- package/package.json +2 -2
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { NavItemProps } from './types';
|
|
3
3
|
interface HeaderNavProps {
|
|
4
|
-
navItems?:
|
|
5
|
-
onNavItemClick?: (item:
|
|
4
|
+
navItems?: NavItemProps[];
|
|
5
|
+
onNavItemClick?: (item: NavItemProps) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const HeaderNav: React.FC<HeaderNavProps>;
|
|
8
8
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Color } from '../../theme';
|
|
2
2
|
import { BoxProps } from '../Box';
|
|
3
|
-
export interface
|
|
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?:
|
|
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:
|
|
44
|
+
onNavItemClick?: (item: NavItemProps) => void;
|
|
45
45
|
/**
|
|
46
46
|
* Called when the sign in button is clicked
|
|
47
47
|
*/
|