UNPKG

vue-sidebar-menu

Version:
40 lines (39 loc) 2.15 kB
import type { ComputedRef, Ref } from 'vue'; import type { MobileItemRect, SidebarItem, SidebarMenuProps } from '../types'; declare const useProvideSidebar: (props: SidebarMenuProps, sidebarRef: Ref<HTMLElement | null, HTMLElement | null>, isCollapsed: Ref<boolean, boolean>, getMobileItem: ComputedRef<SidebarItem | null>, getMobileItemRect: ComputedRef<MobileItemRect>, currentRoute: Ref<string, string>, updateIsCollapsed: (val: boolean) => void, setMobileItem: ({ item, itemEl, }: { item: SidebarItem; itemEl: HTMLElement; }) => void, unsetMobileItem: (immediate?: boolean, delay?: number) => void, clearMobileItemTimeout: () => void, onRouteChange: () => void, emitItemClick: (event: Event, item: SidebarItem) => void) => { getSidebarProps: SidebarMenuProps; getSidebarRef: Ref<HTMLElement | null, HTMLElement | null>; getIsCollapsed: Ref<boolean, boolean>; getMobileItem: ComputedRef<SidebarItem | null>; getMobileItemRect: ComputedRef<MobileItemRect>; getCurrentRoute: Ref<string, string>; updateIsCollapsed: (val: boolean) => void; setMobileItem: ({ item, itemEl, }: { item: SidebarItem; itemEl: HTMLElement; }) => void; unsetMobileItem: (immediate?: boolean, delay?: number) => void; clearMobileItemTimeout: () => void; onRouteChange: () => void; emitItemClick: (event: Event, item: SidebarItem) => void; }, useInjectSidebar: () => { getSidebarProps: SidebarMenuProps; getSidebarRef: Ref<HTMLElement | null, HTMLElement | null>; getIsCollapsed: Ref<boolean, boolean>; getMobileItem: ComputedRef<SidebarItem | null>; getMobileItemRect: ComputedRef<MobileItemRect>; getCurrentRoute: Ref<string, string>; updateIsCollapsed: (val: boolean) => void; setMobileItem: ({ item, itemEl, }: { item: SidebarItem; itemEl: HTMLElement; }) => void; unsetMobileItem: (immediate?: boolean, delay?: number) => void; clearMobileItemTimeout: () => void; onRouteChange: () => void; emitItemClick: (event: Event, item: SidebarItem) => void; } | undefined; export { useProvideSidebar, useInjectSidebar as useSidebar };