UNPKG

synapse-react-client

Version:

[![Build Status](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client.svg?branch=main)](https://travis-ci.com/Sage-Bionetworks/Synapse-React-Client) [![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synaps

35 lines (34 loc) 1.38 kB
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 {};