docs(ui): explain page and shared component lifecycle boundaries

This commit is contained in:
2026-11-12 16:11:24 +08:00
parent 5d82655e0e
commit cc2172319e
10 changed files with 19 additions and 5 deletions
+1
View File
@@ -21,6 +21,7 @@ export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "chi
export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
function IconButton({ icon: Icon, label, title = label, className = "", type = "button", ...props }, ref) {
// Provider存在时由Radix显示提示,移除原生title以免出现两层提示;图标自身对读屏隐藏。
// 后置 ...props 可以覆盖 aria-label 等同名属性;label 是默认名称,最终 DOM 语义由调用者共同负责。
const feedback = useContext(FeedbackContext);
const button = (
<button