@octopusdeploy/design-system-components
Version:
The design systems component library.
42 lines (41 loc) • 1.46 kB
TypeScript
import type { MouseEventHandler } from "react";
import type React from "react";
import type { DesignSystemLinkHref, ShowLinkAsActive } from "../../routing/OctopusRoutingContext";
interface SharedSideNavBarLinkTabProps {
/**
* The icon for this link.
*/
icon: React.ReactNode;
/**
* The link location.
*/
href: DesignSystemLinkHref;
showLinkAsActive?: ShowLinkAsActive;
/**
* The onClick handler associated with the tab.
*/
onClick?: MouseEventHandler<Element>;
/**
* The hover handler associated with the tab.
*/
onIsHoveredChanged?: (isHovered: boolean) => void;
}
interface SideNavBarLinkTabIconOnlyProps extends SharedSideNavBarLinkTabProps {
/**
* The required accessible name for this icon link.
*/
accessibleName: string;
}
interface SideNavBarLinkTabWithLabelProps extends SharedSideNavBarLinkTabProps {
/**
* An optional accessible name for this icon link. If no accessible name is provided the label will be used.
*/
accessibleName?: string;
/**
* The label for this icon link.
*/
label: string;
}
type SideNavBarLinkTabIconLinkProps = SideNavBarLinkTabIconOnlyProps | SideNavBarLinkTabWithLabelProps;
export declare function SideNavBarLinkTab({ icon, showLinkAsActive, href, accessibleName, onClick, onIsHoveredChanged, ...props }: SideNavBarLinkTabIconLinkProps): import("react/jsx-runtime").JSX.Element;
export {};