@starasia/admin 1.4.1 → 1.4.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.
@@ -11,6 +11,8 @@ interface BackButtonProps {
11
11
  onClick?: () => void;
12
12
  textColor?: React.CSSProperties["color"] | string;
13
13
  iconColor?: React.CSSProperties["color"] | string;
14
+ hoverTextColor?: React.CSSProperties["color"] | string;
15
+ hoverIconColor?: React.CSSProperties["color"] | string;
14
16
  iconName?: IconName;
15
17
  }
16
18
  interface ActionProps {
@@ -19,3 +19,4 @@ export declare const AppComponent: ({ router, menus, menuBottom, logo, appName,
19
19
  export declare const App: React.MemoExoticComponent<({ router, menus, menuBottom, logo, appName, initialUserData, theme, }: AppProps) => React.JSX.Element>;
20
20
  export * from './hooks';
21
21
  export * from './context';
22
+ export * from './sidebarBadges';
@@ -0,0 +1,14 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+ import { SidebarBadge, SidebarBadgeValue } from '../../types';
3
+
4
+ export type SidebarBadgeInput = SidebarBadge | SidebarBadgeValue | null | undefined;
5
+ export type SidebarBadgeMap = Record<number, SidebarBadgeInput>;
6
+ export interface SidebarBadgesContextValue {
7
+ badges: SidebarBadgeMap;
8
+ setBadge: (menuId: number, value: SidebarBadgeInput | ((prev: SidebarBadgeInput) => SidebarBadgeInput)) => void;
9
+ setBadges: (next: SidebarBadgeMap | ((prev: SidebarBadgeMap) => SidebarBadgeMap)) => void;
10
+ clearBadge: (menuId: number) => void;
11
+ }
12
+ export declare const SidebarBadgesProvider: ({ children }: PropsWithChildren) => React.JSX.Element;
13
+ export declare const useSidebarBadges: () => SidebarBadgesContextValue;
14
+ export declare const resolveSidebarBadge: (staticBadge: SidebarBadge | undefined, runtimeBadge: SidebarBadgeInput) => SidebarBadge | null;