import React from 'react'; import { ComponentProps } from '../utils/types'; export declare const isRootRelativeLink: (to: string | undefined) => boolean; export declare const isInternalLink: (to: string | undefined) => boolean; interface ClickablePropsBase { children?: React.ReactNode; /** * Prevents user from activating the component and adds disabled styling. * * If set to `dimmed`, the component is able to receive focus. * If set to `disabled`, the component is unable to receive focus (as a result of setting the html `disabled` attribute). * * The default behavior when `disabled={true}` is `dimmed`. */ disabled?: boolean | 'dimmed' | 'disabled'; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. * * `HTMLAnchorElement` in link mode, `HTMLButtonElement` otherwise. */ elementRef?: React.Ref; /** * The onClick event handler is ignored if Ctrl or meta keys are pressed, * which allows the link to open in a new context. */ onClick?: React.MouseEventHandler; /** * To open the link in a new window, set openInNewContext to `true`. * Ignored if not in link mode. */ openInNewContext?: boolean; /** * The text representation of the navigational link. * This should be provided if child content is not a string. * * Ignored if not in link mode. */ navigationLabel?: string; /** * @private */ tag?: 'a' | 'button'; /** * A URL for a link. If set, an `a` element is used instead * of a `button` element (link mode). */ to?: string; } type ClickableButtonProps = ComponentProps; type ClickableLinkProps = ComponentProps; type ClickableProps = ClickableButtonProps | ClickableLinkProps; /** * `Clickable` renders as a `button` element, or as an `a` element if the `to` prop is set * and the `disabled` prop is `false`. This is called link mode. */ declare const Clickable: React.ForwardRefExoticComponent>; export default Clickable; export { ClickableButtonProps, ClickableLinkProps, ClickableProps, ClickablePropsBase };