update types and improve tooltip component
This commit is contained in:
parent
b3d5221ac2
commit
4f72d54cb1
3 changed files with 18 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { ReactElement } from "react";
|
||||
import { LightTooltip } from "../LightTooltipComponent";
|
||||
import { TooltipComponentType } from "../../types/components";
|
||||
|
||||
export default function Tooltip({ children, title }:{children:ReactElement,title:string}) {
|
||||
return <LightTooltip title={title} arrow>{children}</LightTooltip>;
|
||||
export default function Tooltip({ children, title,placement }:TooltipComponentType) {
|
||||
return <LightTooltip placement={placement} title={title} arrow>{children}</LightTooltip>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,3 +65,17 @@ export type FloatComponentType = {
|
|||
disabled?: boolean;
|
||||
onChange: (value: string) => void;
|
||||
};
|
||||
|
||||
export type TooltipComponentType={children:ReactElement,title:string,placement?:
|
||||
| 'bottom-end'
|
||||
| 'bottom-start'
|
||||
| 'bottom'
|
||||
| 'left-end'
|
||||
| 'left-start'
|
||||
| 'left'
|
||||
| 'right-end'
|
||||
| 'right-start'
|
||||
| 'right'
|
||||
| 'top-end'
|
||||
| 'top-start'
|
||||
| 'top';}
|
||||
|
|
@ -6,7 +6,7 @@ export type TabsContextType = {
|
|||
setTabIndex: (index: number) => void;
|
||||
flows: Array<FlowType>;
|
||||
removeFlow: (id: string) => void;
|
||||
addFlow: (flowData?: any) => void;
|
||||
addFlow: (flowData?: FlowType) => void;
|
||||
updateFlow: (newFlow: FlowType) => void;
|
||||
incrementNodeId: () => number;
|
||||
downloadFlow: (flow:FlowType) => void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue