Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type: add deprecated info #485

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface TooltipProps
onVisibleChange?: (visible: boolean) => void;
afterVisibleChange?: (visible: boolean) => void;
overlay: (() => React.ReactNode) | React.ReactNode;
/** @deprecated Please use `styles={{ root: {} }}` */
overlayStyle?: React.CSSProperties;
overlayClassName?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overlayClassName 也废弃掉?

getTooltipContainer?: (node: HTMLElement) => HTMLElement;
Expand All @@ -41,6 +42,7 @@ export interface TooltipProps
showArrow?: boolean | ArrowType;
arrowContent?: React.ReactNode;
id?: string;
/** @deprecated Please use `styles={{ inner: {} }}` */
overlayInnerStyle?: React.CSSProperties;
Comment on lines +45 to 46
Copy link

@coderabbitai coderabbitai bot Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

需要更新 README.md 中的 API 文档

README.md 中仍在展示已废弃的 overlayStyle 属性,但没有标注废弃提示或推荐使用新的 styles.inner 属性。建议:

  • 在 README.md 的 API 表格中为 overlayStyle 添加废弃标记
  • 添加说明引导用户使用新的 styles.inner 属性
🔗 Analysis chain

废弃提示添加正确,建议确保一致性

废弃提示的格式和内容符合规范,清晰地指导用户使用新的 styles.inner 属性。

建议确保所有相关文档和示例代码都反映这个变更。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查是否有相关的示例代码或文档需要更新
fd -e md -e mdx | xargs rg -l "overlayInnerStyle|overlayStyle"

Length of output: 87


Script:

#!/bin/bash
# Check the content of README.md and CHANGELOG.md for overlayInnerStyle usage
echo "=== README.md ==="
rg -A 3 "overlayInnerStyle|overlayStyle" README.md

echo -e "\n=== CHANGELOG.md ==="
rg -A 3 "overlayInnerStyle|overlayStyle" CHANGELOG.md

Length of output: 1304

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README 里也改一下

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afc163,好的。建议在 README.md 中更新 overlayStyleoverlayInnerStyle 属性的说明,添加 @deprecated 标记,并引导用户使用新的 styles 属性。这样可以帮助用户更清晰地了解新的用法。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README 里也改一下

readme 这么改行不

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

zIndex?: number;
styles?: TooltipStyles;
Expand Down
Loading