UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

15 lines (14 loc) • 489 B
import { useSkipLinkId } from './use-skip-link-id'; /** * Returns an ID for use by the layout element and skip links. * * If the consumer has already provided an ID, it will be used instead. * Otherwise, a unique ID will be returned. */ export function useLayoutId() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, providedId = _ref.providedId; var uniqueId = useSkipLinkId(); var id = providedId ? providedId : uniqueId; return id; }