-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Slider] Add system prop #22819
[Slider] Add system prop #22819
Changes from all commits
c2d31cc
5ae933f
18b0668
f0ef95c
c7bebb8
92b2d6e
13da531
cf5d9a5
b8d1291
66c1656
de39dd6
830d99a
4f8aacb
8967a49
2f36b4c
a980971
621bdd8
d906feb
0822e62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ const overridesResolver = (props, styles, name) => { | |
const SliderRoot = muiStyled( | ||
'span', | ||
{}, | ||
{ muiName: 'MuiSlider', overridesResolver }, | ||
{ muiName: 'MuiSlider', overridesResolver, addSystemProps: true }, | ||
)((props) => ({ | ||
height: 2, | ||
width: '100%', | ||
|
@@ -436,6 +436,10 @@ Slider.propTypes = { | |
* @default 1 | ||
*/ | ||
step: PropTypes.number, | ||
/** | ||
* System props to apply to the component. | ||
*/ | ||
system: PropTypes.object, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably come up with better name here... But I would definitely vote for defining all system props under one prop instead of spreading them on each component, mainly because of the following reasons:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking more of a prop like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's get some other feedback before changing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we have a 📊 on Twitter about the best API for the system? styled-system pushes for flattening; theme-ui.com pushes for isolation under one prop, well they have props too. Both have the same author. A benchmark: https://trello.com/c/IUve1J6o/1577-system-core-component There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We need to be careful with that statement and consider audiences. A very large portion have a backend background. So far I've only heard of it in the context of Theme-UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding the flatten vs prop tradeoff. Any thoughts on it? The summarized version:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yep, and I am saying
Agree, again if we are using the system props as superset of CSS I am revoking the system
Agree 👍
These should basically be the same as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
From my perspective, we should go with the superset of CSS for the standalone property. We would gain an improved version of the CSS prop without the limitations of the Box. I can't think of any real downside. |
||
/** | ||
* The track presentation: | ||
* | ||
|
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.
Changes will be reverted before merging