-
-
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
[AppBar] Add iconStyleLeft prop #3668
Conversation
@@ -260,7 +268,7 @@ const AppBar = React.createClass({ | |||
} | |||
|
|||
menuElementLeft = ( | |||
<div style={prepareStyles(Object.assign({}, styles.iconButtonStyle))}> | |||
<div style={prepareStyles(iconLeftStyle)}> |
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.
Might this be a regression? Why even change these?
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.
iconRightStyle
will change the style of menuElementRight
.
iconLeftStyle
should also be similar.
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.
Yeah, but this is a breaking change. you shouldn't remove the styles.iconButtonStyle
just override it: Object.assign({}, styles.iconButtonStyle, iconLeftStyle)
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.
Oh, I'm sorry. Including a test, and re-commit again at a later date. 😵
91e90bb
to
13abf8d
Compare
@@ -247,6 +253,8 @@ const AppBar = React.createClass({ | |||
style: prepareStyles(Object.assign(styles.title, styles.mainElement, titleStyle)), | |||
}, title); | |||
|
|||
const iconLeftStyle = Object.assign({}, styles.iconButtonStyle, iconStyleLeft); |
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.
you shouldn't do this either as it's resulting in calling prepareStyles twice. Please follow my comments as they are 😁
@alitaheri @newoga This component is way too rigid. |
I agree, are we still going to try to merge the new AppBar this release? |
👍 yeah, would you like any improvements to other? |
import IconButton from 'src/icon-button'; | ||
import Paper from 'src/paper'; | ||
import NavigationClose from 'src/svg-icons/navigation/close'; | ||
import 'src/'; |
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 is this for?
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 is a typo, it was deleted 😅
- Add export `getStyles` of app-bar.js for test
@newoga what's the situ with this PR? |
Updated PR. would appreciate your review. |
#3667
Fix #3667