-
Notifications
You must be signed in to change notification settings - Fork 4k
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(Image): improve handling of HTML props #2316
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2316 +/- ##
=======================================
Coverage 99.73% 99.73%
=======================================
Files 152 152
Lines 2659 2659
=======================================
Hits 2652 2652
Misses 7 7
Continue to review full report at Codecov.
|
…Semantic-Org/Semantic-UI-React into feat/image-props # Conflicts: # src/elements/Image/Image.d.ts
src/elements/Image/Image.js
Outdated
@@ -73,6 +71,7 @@ function Image(props) { | |||
className, | |||
) | |||
const rest = getUnhandledProps(Image, props) | |||
const [imgTagProps, rootProps] = partitionHTMLInputProps(rest, { htmlProps: imageProps }) |
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.
This seems strange to overload an input prop parser for an image. Should this become a generic parser?
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.
Agree, I will update PR and we will go with partitionHTMLProps
.
|
Released in |
Related to #2079.
This PR improves handling of HTML props using our
partitionHTMLInputProps
function and adds examples.