UNPKG

792 BTypeScriptView Raw
1import * as React from "react";
2import * as StyledSystem from "styled-system";
3import * as Emotion from "@emotion/styled";
4import { PseudoBoxProps } from "../PseudoBox";
5
6export interface ILink {
7 /**
8 * If `true`, the link will open in new tab
9 */
10 isExternal?: boolean;
11 /**
12 * If `true`, the link will be disabled and not tabbable
13 */
14 isDisabled?: boolean;
15 /**
16 * Action to perform when clicked
17 */
18 onClick?: React.MouseEventHandler<HTMLAnchorElement>;
19}
20
21export type LinkProps = ILink &
22 PseudoBoxProps &
23 React.HTMLProps<HTMLAnchorElement>;
24
25/**
26 * Links are accesible elements used primarily for navigation. This component is
27 * styled to resemble a hyperlink and semantically renders an `<a>`.
28 */
29declare const Link: React.FC<LinkProps>;
30
31export default Link;