https://github.com/markshust/meteor-material-ui
Package that contains the React implementation of Google Material Design
https://github.com/markshust/meteor-material-ui
Last synced: about 1 year ago
JSON representation
Package that contains the React implementation of Google Material Design
- Host: GitHub
- URL: https://github.com/markshust/meteor-material-ui
- Owner: markshust
- Created: 2015-11-05T05:13:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-08T22:42:58.000Z (over 10 years ago)
- Last Synced: 2025-03-25T09:49:18.338Z (about 1 year ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 19
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markoshust:material-ui
## Add Google's Material Design Library to Meteor
`meteor add markoshust:material-ui`
Pulls library from the official React implementation of Google Material Design at `material-ui` NPM repo and uses Meteor's built-in `react` package. Also, automatically runs `injectTapEventPlugin()` at startup. This package also exposes material-ui to the server for SSR support.
## Usage
Create a component, and import desired components using the following format:
```
const { AppBar, IconButton, IconMenu, LeftNav } = mui;
const { MenuItem } = mui.Menus;
const { NavigationMoreVert } = mui.SvgIcons;
const Styles = mui.Styles;
const Colors = Styles.Colors;
App = React.createClass({
childContextTypes : {
muiTheme: React.PropTypes.object
},
getInitialState() {
return {
open: false
};
},
getChildContext() {
return {
muiTheme: Styles.ThemeManager.getMuiTheme(Styles.LightRawTheme)
};
},
handleToggle() {
this.setState({open: ! this.state.open});
},
render() {
return (
this.setState({open})}
>
}
>
}
/>
);
}
});
Meteor.startup(() => {
ReactDOM.render(, document.getElementById('app'));
});
```
## Documentation
See the React Material-UI site for more details on how you can use components.