[core] Start simplifying styling API#7730
Merged
Merged
Conversation
sebald
pushed a commit
to PTW-Freiburg/material-ui
that referenced
this pull request
Aug 15, 2017
* upstream/v1-beta: (24 commits) v1.0.0-beta.5 Update CHANGELOG.md [CHANGELOG] Prepare v1.0.0-beta.5 chore(package): update size-limit to version 0.9.0 (mui#7757) [docs] Fix yarn docs:build script (mui#7745) [docs] Update the readme [Radio] Fix accessibility issue (mui#7742) [Tabs][BottomNavigation] Use value over index property (mui#7741) [core] Remove createStyleSheet (mui#7740) [core] Start simplifying styling API (mui#7730) [LinearProgress] Use transform instead width (mui#7732) Fix Typo (mui#7736) Documentation Fix - Fixing up the README documentation (mui#7733) [ButtonBase] Expose internal component (mui#7727) [Popover] Refactor popover transition - separation of concerns (mui#7720) Button documentation fix (mui#7726) Update supported-components.md (mui#7722) chore(package): update webpack to version 3.5.3 (mui#7723) [flow] flow type transitions Slide, Fade, Collapse (fixes) Create CODE_OF_CONDUCT.md ...
13 tasks
iquabius
added a commit
to iquabius/olimat
that referenced
this pull request
Aug 17, 2017
With example from Next.js: - vercel/next.js@58c2d13 And some API changes that happened yesterday (MUI is still in beta): - https://github.com/callemall/material-ui/releases/tag/v1.0.0-beta.5 - mui/material-ui#7730 - mui/material-ui#7740
|
@oliviertassinari with createStyleSheets removed how should we access the theme data? For example I am currently doing things like this export default createStyleSheet(theme => ({
container: {
borderBottom: `solid 1px ${theme.palette.common.faintBlack}`,
display: 'flex',
justifyContent: 'space-between',
alignContent: 'center',
}
})); |
Member
Author
|
Have a look at the diff of #7740. |
|
Looked through the diff. Still don't get how to use the theme now in an elegant way. Tips appreciated :) |
Member
Author
-export default createStyleSheet(theme => ({
+export default theme => ({
container: {
borderBottom: `solid 1px ${theme.palette.common.faintBlack}`,
display: 'flex',
justifyContent: 'space-between',
alignContent: 'center',
}
-}));
+}); |
|
Much appreciated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step toward #7636.
nameoption fromcreateStyleSheettowithStyles.optionargument fromcreateStyleSheettowithStyles.Now, we should be able to hide
createStyleSheetquite easily.