Files
FastGPT/packages/web/components/common/MyTooltip/index.tsx
heheer 6288dc9492 feat: undo-redo & edit snapshots (#2436)
* feat: undo-redo & edit snapshots

* fix merge

* add simple history back

* fix some undo

* change app latest version

* fix

* chatconfig

* fix snapshot

* fix

* fix

* fix

* fix compare

* fix initial

* fix merge:

* fix useEffect

* fix snapshot initial and saved state

* chore

* fix

* compare snapshot

* nodes edges useEffct

* fix chatconfig

* fix

* delete unused method

* fix

* fix

* fix

* default version name
2024-08-23 15:58:43 +08:00

30 lines
685 B
TypeScript

import React from 'react';
import { Tooltip, TooltipProps } from '@chakra-ui/react';
interface Props extends TooltipProps {}
const MyTooltip = ({ children, shouldWrapChildren = true, ...props }: Props) => {
return (
<Tooltip
className="chakra-tooltip"
bg={'white'}
arrowShadowColor={'rgba(0,0,0,0.05)'}
hasArrow
arrowSize={12}
offset={[-15, 15]}
color={'myGray.800'}
px={4}
py={2}
borderRadius={'8px'}
whiteSpace={'pre-wrap'}
boxShadow={'1px 1px 10px rgba(0,0,0,0.2)'}
shouldWrapChildren={shouldWrapChildren}
{...props}
>
{children}
</Tooltip>
);
};
export default MyTooltip;