Skip to content
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

[core] Remove createStyleSheet #7740

Merged
merged 1 commit into from
Aug 12, 2017
Merged

[core] Remove createStyleSheet #7740

merged 1 commit into from
Aug 12, 2017

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Aug 12, 2017

Closes #7636

-import { withStyles, createStyleSheet } from 'material-ui/styles';
+import { withStyles } from 'material-ui/styles';

-const styleSheet = createStyleSheet('Button', {
+const styles = {
  root: {
    background: 'red',
  },
-});
+};

// ...

-export default withStyles(styleSheet)(AppContent);
+export default withStyles(styles, { name: 'Button' })(Button);
  • 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).

@oliviertassinari oliviertassinari merged commit 8ba45ba into mui:v1-beta Aug 12, 2017
@oliviertassinari oliviertassinari deleted the remove-createStyleSheet branch August 12, 2017 10:14
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
  ...
sebald pushed a commit that referenced this pull request Aug 17, 2017
iquabius added a commit to iquabius/olimat that referenced this pull request Aug 17, 2017
sebald added a commit that referenced this pull request Aug 18, 2017
- Update `<Tabs>` API to match BC introduced in #7741
- Update `withStyle` API to match BC introduced in #7740
- Remove discriminated unions (microsoft/TypeScript#17882)
Copy link
Contributor

@Izhaki Izhaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm..

class MyComponent extends Component {
render () {
return <div />;
return <div className={this.classes.root} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? this.props.classes.root?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to fix the docs? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure can. But tomorrow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class MyComponent extends Component {
render () {
return <div />;
return <div className={this.classes.root} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

alexhayes added a commit to alexhayes/material-ui that referenced this pull request Sep 7, 2017
@alexhayes alexhayes mentioned this pull request Sep 7, 2017
4 tasks
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Sep 7, 2017
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Sep 12, 2017
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Sep 20, 2017
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Sep 20, 2017
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Oct 2, 2017
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Oct 2, 2017
alexhayes added a commit to alexhayes/material-ui that referenced this pull request Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants