UNPKG

@trussworks/react-uswds

Version:
20 lines (19 loc) 797 B
import { default as React, JSX } from 'react'; type StyledLinkProps<T> = { variant?: 'external' | 'unstyled' | 'nav'; className?: string; children: React.ReactNode; allowSpacebarActivation?: boolean; } & T; type WithDefaultLinkProps = { href: string; }; type WithCustomLinkProps<T> = { asCustom: React.FunctionComponent<T>; }; export type DefaultLinkProps = StyledLinkProps<JSX.IntrinsicElements['a']> & WithDefaultLinkProps; export type CustomLinkProps<T> = StyledLinkProps<T> & WithCustomLinkProps<T>; export declare function isCustomProps<T>(props: DefaultLinkProps | CustomLinkProps<T>): props is CustomLinkProps<T>; export declare function Link(props: DefaultLinkProps): JSX.Element; export declare function Link<T>(props: CustomLinkProps<T>): JSX.Element; export {};