@geneui/components
Version:
The Gene UI components library designed for BI tools
55 lines (54 loc) • 1.43 kB
TypeScript
import { CSSProperties, JSX, FC } from 'react';
import './Tooltip.scss';
interface ICustomPosition {
left?: number;
top?: number;
}
export interface ITooltipProps {
/**
* The Tooltip component size<br> Possible values: `default | small`
*/
size?: 'default' | 'small';
/**
* Main content for the component.
*/
text?: string;
/**
* Title for the component.
*/
title?: string;
/**
* Style object, to have extra styles.
*/
style?: CSSProperties;
/**
* If `true` the component will be visible without any action.
*/
alwaysShow?: boolean;
/**
* Will display the component in the specified location.
*/
customPosition?: ICustomPosition;
/**
* Any valid React node.
*/
children: JSX.Element | JSX.Element[];
/**
* Positions where will be displayed the Tooltip relates the child component.<br> Possible values: `top | right | bottom | left`
*/
position?: 'top' | 'right' | 'bottom' | 'left';
/**
* Tooltip padding related to the target element
*/
padding?: number;
/**
* Control with screenType appearance of component
*/
screenType?: 'desktop' | 'mobile';
/**
* In case of `false` value, the children component will rendered without Tooltip.
*/
isVisible?: boolean;
}
declare const Tooltip: FC<ITooltipProps>;
export default Tooltip;