@engie-group/fluid-design-system-react
Version:
Fluid Design System React
47 lines (46 loc) • 1.29 kB
TypeScript
import React from 'react';
import { AsChild, HTMLAttributesWithoutComponentProps } from '../../utils/typeHelpers';
declare const linkStyleToCssClasses: {
grayed: string;
contextual: string;
high_contrast: string;
inverse: string;
default: string;
};
declare const linkPositionClasses: {
after: string;
before: string;
};
declare const linkSizeClasses: {
sm: string;
md: string;
};
export declare const NJLink: React.ForwardRefExoticComponent<NJLinkProps & React.RefAttributes<HTMLAnchorElement>>;
type NJLinkCommonProps = {
/**
* Link variant theme
*/
variant?: keyof typeof linkStyleToCssClasses;
/**
* Link size
*/
size?: keyof typeof linkSizeClasses;
/**
* Link material icon
*/
icon?: string;
/**
* Whether icon is before or after text
*/
iconPosition?: keyof typeof linkPositionClasses;
/**
* If link opens in a new page, an icon notifying the user is placed on the right side of the link
*/
isExternal?: boolean;
/**
* Text alternative explaining the external nature of the link
*/
externalLabel?: string;
};
export type NJLinkProps = NJLinkCommonProps & AsChild<HTMLAttributesWithoutComponentProps<'a', NJLinkCommonProps>>;
export {};