love-on-the-route
Version:
37 lines (36 loc) • 873 B
TypeScript
interface Route {
path: string;
title: string;
}
export interface LogoConfig {
html: string;
href?: string;
replacesHome?: boolean;
containerClass?: string;
linkClass?: string;
}
export declare class LoveNav {
private routes;
private options;
private element;
private logoConfig?;
constructor(routes: Route[], options?: {
tagName?: string;
linkClass?: string;
activeClass?: string;
containerClass?: string;
logo?: LogoConfig;
separateLogoFromNav?: boolean;
});
private updateContent;
private setupClickHandlers;
private setupActiveStateListener;
render(): HTMLElement;
renderSeparate(): {
logo?: HTMLElement;
nav: HTMLElement;
};
updateRoutes(newRoutes: Route[]): void;
updateLogo(logoConfig: LogoConfig): void;
}
export {};