@devopness/ui-react
Version:
Devopness Design System React Components - Painless essential DevOps to everyone
52 lines (51 loc) • 1.61 kB
TypeScript
import { HTMLProps, default as React } from 'react';
import { Color } from '../../../colors';
import { IconProps } from '../Icon';
import { Unwrap } from '../../types';
type LinkProps = Omit<HTMLProps<HTMLAnchorElement>, 'href' | 'target' | 'color' | 'ref' | 'as'> & {
/**
* Defines element foreground color
*
* https://developer.mozilla.org/en-US/docs/Web/CSS/color
* https://developer.mozilla.org/en-US/docs/Web/CSS/fill
*
* @see {getColor}
*/
color?: Color;
/**
* The URL that the hyperlink points to.
*
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href
*/
to?: HTMLProps<HTMLAnchorElement>['href'];
/**
* Where to display the linked URL.
*
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target
*/
target?: '_blank' | '_self';
/**
* Icon's Props
*
* @see {Icon}
*/
iconProps?: Unwrap<Omit<IconProps, 'name'>>;
/**
* Hides default underline when the element is visible
*/
hideUnderline?: boolean;
/**
* Hides underline when hovering the element
*/
hideUnderlineOnHover?: boolean;
/**
* Hides External URL Icon
*/
hideExternalUrlIcon?: boolean;
};
/**
* Display a hyperlink to other application pages or external resources
*/
declare const Link: ({ target, children, color, rel, to: href, hideUnderline, hideUnderlineOnHover, hideExternalUrlIcon, iconProps, ...props }: React.PropsWithChildren<LinkProps>) => import("react/jsx-runtime").JSX.Element;
export type { LinkProps };
export { Link };