An open API service indexing awesome lists of open source software.

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

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.