瀏覽代碼

feat: add disabled support to tooltip-plus component (#7036)

tags/0.7.0
NFish 1 年之前
父節點
當前提交
1a302ca957
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      web/app/components/base/tooltip-plus/index.tsx

+ 3
- 1
web/app/components/base/tooltip-plus/index.tsx 查看文件

@@ -8,6 +8,7 @@ import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigge
export type TooltipProps = {
position?: Placement
triggerMethod?: 'hover' | 'click'
disabled?: boolean
popupContent: React.ReactNode
children: React.ReactNode
hideArrow?: boolean
@@ -23,6 +24,7 @@ const arrow = (
const Tooltip: FC<TooltipProps> = ({
position = 'top',
triggerMethod = 'hover',
disabled = false,
popupContent,
children,
hideArrow,
@@ -67,7 +69,7 @@ const Tooltip: FC<TooltipProps> = ({

return (
<PortalToFollowElem
open={open}
open={disabled ? false : open}
onOpenChange={setOpen}
placement={position}
offset={offset ?? 10}

Loading…
取消
儲存