@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
21 lines (20 loc) • 900 B
TypeScript
/**
* @typedef {import('../../types').PresentationalProps} CommonProps
* @typedef {import('preact').JSX.HTMLAttributes<HTMLAnchorElement>} HTMLAnchorAttributes
*
* @typedef LinkProps
* @prop {'always'|'hover'|'none'} [underline]
* @prop {'brand'|'text-light'|'text'} [color='brand']
*/
/**
* Styled component for a link (`<a>` element).
*
* @param {CommonProps & LinkProps & HTMLAnchorAttributes} props
*/
export default function Link({ children, classes, elementRef, underline, color, ...htmlAttributes }: CommonProps & LinkProps & HTMLAnchorAttributes): import("preact").JSX.Element;
export type CommonProps = import('../../types').PresentationalProps;
export type HTMLAnchorAttributes = import('preact').JSX.HTMLAttributes<HTMLAnchorElement>;
export type LinkProps = {
underline?: "none" | "always" | "hover" | undefined;
color?: "text" | "text-light" | "brand" | undefined;
};