@aic-kits/react 0.10.1 → 0.10.2
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/Header/HeaderAuth.d.ts +3 -1
- package/dist/components/Header/index.d.ts +5 -3
- package/dist/components/Header/types.d.ts +10 -0
- package/dist/index.cjs +68 -68
- package/dist/index.js +1887 -1874
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { HeaderProps } from './types';
|
|
3
3
|
interface HeaderAuthProps {
|
|
4
4
|
isSignedIn?: boolean;
|
|
5
|
+
isDropdownVisible?: boolean;
|
|
6
|
+
setIsDropdownVisible?: Dispatch<SetStateAction<boolean>>;
|
|
5
7
|
userProfile?: HeaderProps['userProfile'];
|
|
6
8
|
dropdownItems?: HeaderProps['profileDropdownItems'];
|
|
7
9
|
onProfileClick?: () => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HeaderProps } from './types';
|
|
3
|
-
export declare const Header:
|
|
1
|
+
import { ForwardedRef, ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { HeaderHandle, HeaderProps } from './types';
|
|
3
|
+
export declare const Header: ForwardRefExoticComponent<HeaderProps & {
|
|
4
|
+
ref?: ForwardedRef<HeaderHandle>;
|
|
5
|
+
}>;
|
|
4
6
|
export * from './types';
|
|
5
7
|
export * from './HeaderLogo';
|
|
6
8
|
export * from './HeaderNav';
|
|
@@ -60,3 +60,13 @@ export interface HeaderProps extends BoxProps {
|
|
|
60
60
|
*/
|
|
61
61
|
profileDropdownItems?: NavItemProps[];
|
|
62
62
|
}
|
|
63
|
+
export interface HeaderHandle {
|
|
64
|
+
/**
|
|
65
|
+
* Show the profile dropdown
|
|
66
|
+
*/
|
|
67
|
+
showDropdown: () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Hide the profile dropdown
|
|
70
|
+
*/
|
|
71
|
+
hideDropdown: () => void;
|
|
72
|
+
}
|