@trussworks/react-uswds
Version:
React USWDS 3 component library
20 lines (19 loc) • 797 B
TypeScript
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 {};