UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

35 lines (34 loc) 1.13 kB
/** * @typedef {import('preact').ComponentChildren} Children * * @typedef LinkBaseProps * @prop {Children} children * @prop {string} [classes] - Additional CSS classes to apply * @prop {import('preact').Ref<HTMLAnchorElement>} [linkRef] - Optional ref for * the rendered anchor element */ /** * @typedef {LinkBaseProps & import('preact').JSX.HTMLAttributes<HTMLAnchorElement>} LinkProps */ /** * Style and add some attributes to an anchor (`<a>`) element * * @deprecated - Use re-implemented component in the navigation group * * @param {LinkProps} props */ export function Link({ children, classes, linkRef, ...restProps }: LinkProps): import("preact").JSX.Element; export type Children = import('preact').ComponentChildren; export type LinkBaseProps = { children: Children; /** * - Additional CSS classes to apply */ classes?: string | undefined; /** * - Optional ref for * the rendered anchor element */ linkRef?: import("preact").Ref<HTMLAnchorElement> | undefined; }; export type LinkProps = LinkBaseProps & import('preact').JSX.HTMLAttributes<HTMLAnchorElement>;