reactjs-bottom-navigation
Version:
A flexible bottom navigation component for React applications
14 lines (13 loc) • 637 B
TypeScript
/**
* A hook that manages the state of a bottom navigation component.
*
* @param {number | null} initialSelected - The initial selected item index.
* @param {boolean} hideOnScroll - Whether to hide the navigation on scroll.
* @returns {[{ current: number | null, hidden: boolean, scrollY: number }, (selected: number | null) => void]} - The state and setSelected function.
*/
declare const useBottomNavigation: (initialSelected: number | null, hideOnScroll: boolean) => [{
current: number | null;
hidden: boolean;
scrollY: number;
}, (selected: number | null) => void];
export default useBottomNavigation;