refactor[ReactTooltipComponent]: Move type TooltipProps to types directorie
This commit is contained in:
parent
7ca0f8d60d
commit
83772eeefd
2 changed files with 13 additions and 12 deletions
|
|
@ -4,18 +4,7 @@ import React from "react";
|
||||||
import { Tooltip as ReactTooltip } from "react-tooltip";
|
import { Tooltip as ReactTooltip } from "react-tooltip";
|
||||||
import "react-tooltip/dist/react-tooltip.css";
|
import "react-tooltip/dist/react-tooltip.css";
|
||||||
import { classNames } from "../../utils/utils";
|
import { classNames } from "../../utils/utils";
|
||||||
|
import { TooltipProps } from "../../types/components";
|
||||||
type TooltipProps = {
|
|
||||||
selector: string;
|
|
||||||
content?: string;
|
|
||||||
disabled?: boolean;
|
|
||||||
htmlContent?: React.ReactNode;
|
|
||||||
className?: string; // This should use !impornant to override the default styles eg: '!bg-white'
|
|
||||||
position?: "top" | "right" | "bottom" | "left";
|
|
||||||
clickable?: boolean;
|
|
||||||
children: React.ReactNode;
|
|
||||||
delayShow?: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
const TooltipReact: FC<TooltipProps> = ({
|
const TooltipReact: FC<TooltipProps> = ({
|
||||||
selector,
|
selector,
|
||||||
|
|
|
||||||
|
|
@ -179,3 +179,15 @@ export type InputProps = {
|
||||||
setDescription: (description: string) => void;
|
setDescription: (description: string) => void;
|
||||||
updateFlow: (flow: { id: string; name: string }) => void;
|
updateFlow: (flow: { id: string; name: string }) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type TooltipProps = {
|
||||||
|
selector: string;
|
||||||
|
content?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
htmlContent?: React.ReactNode;
|
||||||
|
className?: string; // This should use !impornant to override the default styles eg: '!bg-white'
|
||||||
|
position?: "top" | "right" | "bottom" | "left";
|
||||||
|
clickable?: boolean;
|
||||||
|
children: React.ReactNode;
|
||||||
|
delayShow?: number;
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue