Skip to content

rozzzly/react-material-ui

 
 

Repository files navigation

meteor add izzilab:material-ui

From version 0.1.7, we upgrade to MUI 0.12.1 and it have breaking changes

Introduction

This package ported from Material-UI (a React Component) using the official Meteor React package.

Install

  1. Install the official React package meteor add react
  2. Install this package meteor add izzilab:material-ui

Using

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(() => React.render(<App/>, document.body));
}

CHANGELOG

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.

About

A Meteor package: converted from http://material-ui.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%