mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
* 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>
27 lines
504 B
TypeScript
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;
|