@visa/nova-react
Version:
Visa Product Design System Nova React library. Compatible with React ^19.
33 lines (32 loc) • 1.27 kB
TypeScript
import { type ComponentPropsWithRef, type ElementType, type HTMLAttributes, type ReactElement } from 'react';
export type LinkProperties<ET extends ElementType = 'a'> = {
/** Alternate color scheme */
alternate?: boolean;
/** Disabled */
disabled?: HTMLAttributes<HTMLElement>['aria-disabled'];
/** No Underline */
noUnderline?: boolean;
/** Skip Link */
skipLink?: boolean;
} & ({
/** Cloned Element (not compatible with tag property) */
element?: never;
/** Tag (not compatible with element property) */
tag?: ElementType;
} | {
/** Cloned Element (not compatible with tag property) */
element?: ReactElement<ComponentPropsWithRef<ET>>;
/** Tag (not compatible with element property) */
tag?: never;
}) & Omit<ComponentPropsWithRef<ET>, ''>;
/**
* Text-based navigation elements that directs users to another destination.
* @docs {@link https://design.visa.com/components/link/?code_library=react | See Docs}
* @vgar TODO
* @wcag TODO
*/
declare const Link: {
<ET extends ElementType = "a">({ alternate, className, disabled, element, noUnderline, skipLink, tag: Tag, ...remainingProps }: LinkProperties<ET>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export default Link;