-
Notifications
You must be signed in to change notification settings - Fork 134
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: support items & add deprecated warning #312
feat: support items & add deprecated warning #312
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #312 +/- ##
==========================================
+ Coverage 98.85% 99.12% +0.27%
==========================================
Files 4 5 +1
Lines 87 114 +27
Branches 33 40 +7
==========================================
+ Hits 86 113 +27
Misses 1 1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
155f29f
to
010d309
Compare
This reverts commit fe8951f. # Conflicts: # src/Collapse.tsx
覆盖率掉了,看看? |
属性是透传的,所以忽略了,可以考虑补一补 |
TODOs:
|
This reverts commit 1143d31.
src/Collapse.tsx
Outdated
@@ -114,7 +121,62 @@ const Collapse = React.forwardRef<HTMLDivElement, CollapseProps>((props, ref) => | |||
return React.cloneElement(child, childProps); | |||
}; | |||
|
|||
const children = toArray(rawChildren).map(getNewChild); | |||
// eslint-disable-next-line @typescript-eslint/no-shadow | |||
const convertItemsToNodes = (items: ItemType[]) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个抽成一个 hooks:
const childNodes = useItems(items, rawChildren);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里没 get 到意思呢,求指点
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This reverts commit 59a9d5f.
No description provided.