-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
feat: add more props to TransBtn #983
feat: add more props to TransBtn #983
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #983 +/- ##
=======================================
Coverage 99.78% 99.78%
=======================================
Files 38 38
Lines 1373 1373
Branches 400 393 -7
=======================================
Hits 1370 1370
Misses 3 3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
483b803
to
333c5c9
Compare
333c5c9
to
0e64448
Compare
0e64448
to
a9d115f
Compare
|
需求
在我们项目的 UI 需求中,需要通过 option 的
disabled
和value
来控制 icon 渲染,例如:isSelected
展示正常的 checkbox目前
menuItemSelectedIcon
支持传入一个函数,但其中的参数只有一个{ isSelected: boolean }
,这个 PR 将value
和disabled
添加进去,便于开发者使用。如下图所示,第一条因为是 disabled 状态,所以右边的 icon 被设置为了 0.5 透明度。
影响面
(props: MenuItemProps) => ReactNode
,而MenuItemProps
没有具体类型;ts 定义里面也没有固定类型