@fchh/fcos-suite-ui
Version:
Reusable UI components based on React and TailwindCSS for the Fab City OS Suite (initially funded by the Interfacer EU project).
58 lines (57 loc) • 1.58 kB
TypeScript
import { INestedMenuItem } from './IMenu';
export interface IHeader {
className?: string;
topBarItems: ITopBarItem[];
toolBarItems: IToolbarItem[];
extendedToolBarItems?: IToolbarItem[];
onClickHamburger?: () => void;
logoLinkTarget?: string;
languages?: Array<string>;
onChangeLanguage?: (newLanguage: string) => void;
selectedLanguage?: string;
onSearch?: (keyword: string) => void;
disableAnimation?: boolean;
itemsAlwaysLight?: boolean;
hideSearchIcon?: boolean;
logoClassName?: string;
}
export interface IMobileMenu {
isMobileOpen: boolean;
data: ITopBarItem[];
}
export interface IHamburger {
onClick: () => void;
light?: boolean;
}
export interface IToolbar {
isMobileOpen: boolean;
className?: string;
items?: IToolbarItem[];
extendedToolbarItems?: IToolbarItem[];
}
export interface ITopBar {
items: ITopBarItem[];
languages?: Array<string>;
selectedLanguage?: string;
onChangeLanguage?: (newLanguage: string) => void;
onSearch?: (keyword: string) => void;
light?: boolean;
hideSearchIcon?: boolean;
customLogo?: React.ReactNode;
logoClassName?: string;
}
export interface ITopBarItem extends INestedMenuItem {
levelThreeToTheLeft?: boolean;
faded?: boolean;
onHover?: (value: boolean) => void;
firstItem?: boolean;
}
export interface IToolbarItem {
title: string;
icon: React.ReactNode;
href: string;
onlyDesktop?: boolean;
className?: string;
faded?: boolean;
onHover?: (value: boolean) => void;
}