[enhancement] flexible export from root for props#234
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #234 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 107 107
Branches 31 31
=========================================
Hits 107 107 ☔ View full report in Codecov by Sentry. |
afc163
reviewed
Nov 20, 2023
| @@ -1,3 +1,6 @@ | |||
| export * from './Dropdown'; | |||
Member
There was a problem hiding this comment.
Suggested change
| export * from './Dropdown'; | |
| export type { TriggerProps, DropdownProps } from './Dropdown'; |
Do not use export *.
Contributor
Author
There was a problem hiding this comment.
@afc163 sounds better, updated PR with this suggestion
afc163
reviewed
Nov 20, 2023
afc163
reviewed
Nov 20, 2023
| @@ -1,3 +1,6 @@ | |||
| import Dropdown from './Dropdown' | |||
| export type { DropdownProps, TriggerProps } from './Dropdown'; | |||
Member
There was a problem hiding this comment.
Suggested change
| export type { DropdownProps, TriggerProps } from './Dropdown'; | |
| export type { TriggerProps } from '@rc-component/trigger'; | |
| export type { DropdownProps } from './Dropdown'; |
c5af389 to
6927c17
Compare
xettri
commented
Apr 21, 2024
Contributor
Author
xettri
left a comment
There was a problem hiding this comment.
Resolved feedback's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DropdownProps
Before
import { DropdownProps } from 'rc-dropdown/lib/Dropdown';Now
import { DropdownProps } from 'rc-dropdown/lib/Dropdown';import { DropdownProps } from 'rc-dropdown';OverlayProps
Before
import { OverlayProps } from 'rc-dropdown/lib/Overlay';Now
import { OverlayProps } from 'rc-dropdown/lib/Overlay';import { OverlayProps } from 'rc-dropdown';TriggerProps
Before
Not supported
Hack
install:
@rc-component/triggerimport { TriggerProps } from '@rc-component/trigger';Now
import { TriggerProps } from 'rc-dropdown';import { TriggerProps } from 'rc-dropdown/lib/Dropdown';Why need TriggerProps ?
We pass all rest props to Trigger (@rc-component/trigger), for advance customization we required that support in
tsso we can skip extra install @rc-component/trigger, with install externally it can lead issue because of version miss match.