meteor add izzilab:material-ui
let {SvgIcons} = MUI.Libs;
...
render() {
let RightIcon = <SvgIcons.NavigationClose />
return (
<AppCanvas>
<AppBar title="izziLab" iconElementRight={RightIcon} />
</AppCanvas>
);
}
This package ported from Material-UI (a React Component) using the official Meteor React package.
meteor add react
meteor add izzilab:material-ui
Some clicks (like DatePicker) only work when you have run injectTapEventPlugin()
first. It is the official temporary fix, will be removed with React v1.0.
Here's some example code to get you started:
//app.jsx
injectTapEventPlugin();
var {
AppCanvas,
AppBar,
Styles,
RaisedButton,
DatePicker
} = MUI;
var { ThemeManager, LightRawTheme } = Styles;
var App = React.createClass({
childContextTypes: {
muiTheme: React.PropTypes.object
},
getChildContext() {
return {
muiTheme: ThemeManager.getMuiTheme(LightRawTheme)
};
},
render: function () {
return (
<AppCanvas>
<AppBar title="izziLab"/>
<div style={{padding: '80px',}}>
<RaisedButton primary={true} label="Tap"/>
<br/>
<DatePicker hintText="Portrait Dialog"/>
<br/>
<DatePicker
hintText="Landscape Dialog"
mode="landscape"/>
</div>
</AppCanvas>
);
}
});
if (Meteor.isClient) {
Meteor.startup(() => {
ReactDOM.render(<App/>, document.getElementById('react-root'));
});
}
Note: This is an old demo with bugs and performance problems. The code is also not updated to use the official react package yet. A new version will follow soon.