synapse-react-client
Version:
[](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [](https://badge.fury.io/js/synaps
35 lines (34 loc) • 1.38 kB
TypeScript
import React, { FunctionComponent } from 'react';
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
declare type CustomImageProps = {
svgImg: React.ComponentElement<any, any>;
altText: string;
};
export declare type TooltipVisualProps = {
delayShow: number;
place: 'top' | 'right' | 'bottom' | 'left';
type: 'dark' | 'success' | 'warning' | 'error' | 'info' | 'light';
effect: 'float' | 'solid';
border?: boolean;
};
/*****************************************
* The control needs to either have a child element or needs to have an image supplied
* If the child element is supplied the control renders the child applying additional properties
* If the image is supplied the control renders a clickable image
* If there are no children and callback Fn is not supplied it is assumed to be a a dropdown trigger
*/
declare type ElementWithTooltipProps = {
image?: IconDefinition | CustomImageProps;
imageColor?: string;
idForToolTip: string;
tooltipText: string;
callbackFn?: () => void;
className?: string;
tooltipVisualProps?: TooltipVisualProps;
darkTheme?: boolean;
size?: FontAwesomeIconProps['size'];
icon?: string;
};
export declare const ElementWithTooltip: FunctionComponent<ElementWithTooltipProps>;
export {};