Files
outline/app/editor/components/Tooltip.tsx
codegen-sh[bot]andTom Moor dae1bce48c chore: Convert Tooltip component from Tippy.js to radix-ui (#9302)
* Convert Tooltip component from Tippy.js to Radix UI

- Replace @tippyjs/react with @radix-ui/react-tooltip
- Maintain backward compatibility with existing props (placement, delay, offset)
- Convert TooltipContext from singleton pattern to provider pattern
- Update editor Tooltip wrapper to use new props
- Remove TippyProps references from ToolbarMenu
- Preserve styling with styled-components and animations
- Remove @tippyjs/react dependency from package.json

* Fix linting issues in Tooltip components

- Move keyframes definitions before usage in Tooltip.tsx
- Replace 'any' type with specific type in TooltipContext.tsx
- Add ESLint disable comments for keyframes used in styled-components

* Fix ESLint issues in Tooltip components

- Move keyframes definitions before styled components that use them
- Fix TypeScript any type in TooltipContext
- Add ESLint disable comments for keyframes variables that are used in template literals

* Fix TypeScript and ESLint errors

- Add proper return type annotation to Tooltip component
- Remove duplicate keyframes definitions
- Fix children return type casting
- Remove deprecated hideOnClick prop from components
- All TypeScript and ESLint checks now pass

* fix

* tidy animation

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-05-30 18:11:37 -04:00

27 lines
504 B
TypeScript

import * as React from "react";
import styled from "styled-components";
import Tooltip, { Props } from "~/components/Tooltip";
const WrappedTooltip: React.FC<Props> = ({
children,
content,
...rest
}: Props) => (
<Tooltip
sideOffset={16}
delayDuration={150}
content={content}
side="top"
shortcutOnNewline
{...rest}
>
<TooltipContent>{children}</TooltipContent>
</Tooltip>
);
const TooltipContent = styled.span`
outline: none;
`;
export default WrappedTooltip;