-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: align card actions to the left #262
Conversation
Hey @gawrysiak, thank you for your pull request 🤗. The documentation from this branch can be viewed here. |
src/components/Card/CardActions.js
Outdated
}, | ||
}); | ||
render() { | ||
const styles = StyleSheet.create({ |
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.
Don't create stylesheets in render, move it to outside. Use inline styles for styles based on props.
src/components/Card/CardActions.js
Outdated
/** | ||
* Should actions be aligned to the right. | ||
*/ | ||
right?: boolean, |
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 don't think we want to provide a prop which doesn't align with material design guidelines. Let's align them to left by default and remove this prop.
This is a suggestion to change the CardActions align from right to left. Additionally, it adds a "right" prop to easily go back to the original behavior, without changing any CSS.
Motivation
It seems like the original Material Design guidelines aligns the actions to the left by default. This is as well the standard behavior for other libs, like material-ui.