UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

71 lines (70 loc) 1.7 kB
import React from 'react'; 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<ILinkProps & React.RefAttributes<HTMLAnchorElement>>; export interface ILinkProps { children: React.ReactNode; /** * Link variant theme */ variant?: keyof typeof linkStyleToCssClasses; /** * Link size */ size?: keyof typeof linkSizeClasses; /** * Link href */ href?: string; /** * Link rel */ rel?: string; /** * Link target. Note when `isExternal` is true, the target is set to '_blank', the `rel` to 'noreferrer' and an icon notifying the user is placed on the right of the link */ target?: string; /** * Id of the link */ id?: string; /** * Title of the link */ title?: string; /** * 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; /** * Optional additional className */ className?: string; onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>; } export {};