UNPKG

@atlaskit/page-layout

Version:

A collection of components which let you compose an application's page layout.

22 lines 510 B
/** * @jsxRuntime classic * @jsx jsx */ import { useEffect } from 'react'; import { useSkipLinks } from '../../controllers'; export const useCustomSkipLink = (id, skipLinkTitle, listIndex = 0) => { const { registerSkipLink, unregisterSkipLink } = useSkipLinks(); useEffect(() => { registerSkipLink({ id, skipLinkTitle, listIndex }); return () => { unregisterSkipLink(id); }; }, [id, listIndex, skipLinkTitle, registerSkipLink, unregisterSkipLink]); };