-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[Progress] Add color property #7500
Conversation
kgregory
commented
Jul 21, 2017
- Addresses issue [Progress] Support the color prop #7221
- Add color property to CircularProgress and LinearProgress, accepts accent and primary (default)
- Add examples to component demo in docs
- Adds tests
- PR has tests / docs demo, and is linted.
- Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
- Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).
- Add color property to CircularProgress and LinearProgress - Add examples in docs
- Eliminate errant use of 'default' color in LinearProgress - Unit tests for CircularProgress - Unit tests for LinearProgress
- API docs
Could you remove the package.lock? I mean, why should we keep it? |
- did not mean to include package-lock.json
@oliviertassinari npm 5 got me - it's gone. Sorry! I didn't mean to include it. |
src/Progress/LinearProgress.js
Outdated
@@ -8,38 +8,56 @@ import withStyles from '../styles/withStyles'; | |||
|
|||
const transitionDuration = 4; // 400ms | |||
|
|||
const getBar = color => ({ |
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.
Should like we have duplicated style injected in the page. What about sharing what's common between the colors?
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.
Just updated now. The only redundancy is that the background attributes for the color-specific dashed classes.
It is meant to be committed, but if you want to handle it otherwise, we should probably add it to |
I have found that thread yarnpkg/yarn#3614. Let's follow 1. @Airblader I agree adding it in the |
See PR mui#7500 for a discussion.
See PR #7500 for a discussion.
- Share as many of the properties as possible - bar, dashed, bufferBar2 baseclasses added back, functions eliminated
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.
One last comment, that looks great 👍
src/Progress/LinearProgress.js
Outdated
backgroundColor: theme.palette.accent.A100, | ||
}, | ||
accentColorBar: { | ||
backgroundColor: theme.palette.accent.A200, |
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.
What about A400? I don't think that we have enough contrast otherwise.
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.
I agree with this. I'll update it when I get a chance tomorrow.
@kgregory Updated :) |
Thanks @oliviertassinari! |