@atlaskit/tag
Version:
A tag labels UI objects for quick recognition and navigation.
13 lines (12 loc) • 307 B
JavaScript
import Link from '@atlaskit/link/link';
/**
* Shared hook for link handling
*/
export function useLink(href, linkComponent) {
const isLink = Boolean(href);
const LinkComponent = linkComponent !== null && linkComponent !== void 0 ? linkComponent : Link;
return {
isLink,
LinkComponent
};
}