UNPKG

mscodepl-react-sidebar

Version:

compitable with react js and next js.

34 lines (33 loc) 1.27 kB
import React from 'react'; export declare const SideBarContext: React.Context<{ small: boolean; activeStyle?: "fill" | "outline" | undefined; setSmall: React.Dispatch<React.SetStateAction<boolean>>; logoUrl: string; title?: string | undefined; userName: React.ReactNode; userEmail: string; mobileHeaderContent?: React.ReactNode; navItems: (() => JSX.Element)[]; onLogoClick?: (() => void) | undefined; onProfileImgClick?: (() => void) | undefined; onLogOut: () => void; }>; interface iSidebarWrapper { logoUrl: string; userName: React.ReactNode; title?: string; userEmail: string; navItems: (() => JSX.Element)[]; children: React.ReactNode; activeStyle?: "fill" | "outline"; mobileHeaderContent?: React.ReactNode; onLogoClick?: () => void; onProfileImgClick?: () => void; onLogOut: () => void; } /** * @description wrape your react router using this sidebarbar wrapper or wrape all component in _App.tsx in next js application */ export default function SidebarWrapper({ title, logoUrl, userName, userEmail, activeStyle, children, mobileHeaderContent, navItems, onLogOut, onProfileImgClick, onLogoClick }: iSidebarWrapper): JSX.Element; export {};