UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

51 lines (50 loc) 1.64 kB
/** * MSKCC DSM 2021, 2023 */ import React, { AnchorHTMLAttributes, AriaAttributes, ComponentType, HTMLAttributeAnchorTarget } from 'react'; interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> { /** * @description Indicates the element that represents the * current item within a container or set of related * elements. */ 'aria-current'?: AriaAttributes['aria-current']; /** * @description Provide a custom className to be applied to * the containing `<a>` node. */ className?: string; /** * @description Specify if the control should be disabled, or not. */ disabled?: boolean; /** * @description Provide the `href` attribute for the `<a>` node. */ href?: string; /** * @description Specify whether you want the inline version of this control. */ inline?: boolean; /** * @description Optional prop to render an icon next to the link. * Can be a React component class */ renderIcon?: ComponentType; /** * Specify the size of the Link. Currently supports either `sm`, 'md' (default) or 'lg` as an option. */ size?: 'sm' | 'md' | 'lg'; /** * @description Specify the target attribute for the `<a>` node. */ target?: HTMLAttributeAnchorTarget; /** * Specify whether you want the link to receive visited styles after the link has been clicked */ visited?: boolean; } declare const Link: React.ForwardRefExoticComponent<LinkProps & { children?: React.ReactNode; } & React.RefAttributes<HTMLAnchorElement>>; export default Link;