feat: tooltip (#7634)

This commit is contained in:
Yi Xiao
2024-08-26 13:00:02 +08:00
committed by GitHub
parent 1ba3d3acd6
commit 3be756eaed
93 changed files with 640 additions and 758 deletions

View File

@@ -13,7 +13,7 @@ import {
import { useStore } from '../store'
import { useCommand } from './hooks'
import cn from '@/utils/classnames'
import TooltipPlus from '@/app/components/base/tooltip-plus'
import Tooltip from '@/app/components/base/tooltip'
type CommandProps = {
type: 'bold' | 'italic' | 'strikethrough' | 'link' | 'bullet'
@@ -60,7 +60,9 @@ const Command = ({
}, [type, t])
return (
<TooltipPlus popupContent={tip}>
<Tooltip
popupContent={tip}
>
<div
className={cn(
'flex items-center justify-center w-8 h-8 cursor-pointer rounded-md text-gray-500 hover:text-gray-800 hover:bg-black/5',
@@ -74,7 +76,7 @@ const Command = ({
>
{icon}
</div>
</TooltipPlus>
</Tooltip>
)
}