@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
107 lines (106 loc) • 2.96 kB
TypeScript
import React from 'react';
interface AppUserDropdownProps {
onLogout?: () => void;
onSelectProfile: () => void;
onSelectChangePassword?: () => void;
navbarTextColors?: {
brand?: string;
general?: string;
};
}
interface EnvironmentBannerProps {
/**
* Whether to show the environment banner
* @default false
*/
show?: boolean;
/**
* Text to display in the banner
* @default ''
*/
text?: string;
/**
* Background color of the banner
* @default 'red'
*/
bgColor?: string;
/**
* Text color of the banner
* @default 'white'
*/
color?: string;
}
interface AppDashboardNavbarProps extends AppUserDropdownProps {
dashboardLink?: string;
brandImage: {
src: string;
alt: string;
width: number;
height: number;
};
linkComponent: React.ElementType;
showThemeToggler?: boolean;
appLabel: string;
/**
* When true, the sidebar toggle button will not be rendered
* @default false
*/
hideSidebarToggle?: boolean;
/**
* Array of custom components (actions) to be rendered just before the user dropdown
*/
navBarActionComponents?: React.ReactNode[];
/**
* When true, shows the locale switcher in the navbar
* @default false
*/
showLocaleSwitcher?: boolean;
/**
* Custom locale names to display in the locale switcher
*/
localeNames?: Record<string, string>;
/**
* Configuration for the environment banner
*/
environmentBanner?: EnvironmentBannerProps;
/**
* Navbar background color configuration
*/
navbarBackground?: {
/**
* Background color for light mode
* @default 'bg-purple'
*/
light?: string;
/**
* Background color for dark mode
* @default 'dark:bg-gray-800'
*/
dark?: string;
};
/**
* Navbar text color configuration
*/
navbarTextColors?: {
/**
* Brand text color (e.g., app label)
* @default 'text-white'
*/
brand?: string;
/**
* General text color for navbar elements
* @default 'text-white'
*/
general?: string;
};
}
declare const AppSidebarToggleButton: React.FC<{
isMobileOpen: boolean;
onToggle: () => void;
}>;
declare const AppDarkThemeToggleWithTooltip: React.FC;
declare const AppUserDropdown: React.MemoExoticComponent<({ onLogout, onSelectChangePassword, onSelectProfile, navbarTextColors, }: AppUserDropdownProps) => import("react/jsx-runtime").JSX.Element>;
declare const AppDashboardNavbar: React.FC<AppDashboardNavbarProps>;
export default AppDashboardNavbar;
export { AppSidebarToggleButton, AppDarkThemeToggleWithTooltip, AppUserDropdown, AppDashboardNavbar };
export type { AppDashboardNavbarProps, AppUserDropdownProps, EnvironmentBannerProps };