css - Changing text color and style in material-ui version 0.15.4 -
i new css , front end web development , having trouble in setting style of button on page. want change text color of , maybe change primary color of theme (currently looks cyan, want make blue). know material-ui has moved inline styles , tried passing style variable "style" field in button, wasn't able make work. appreciated.
var react = require('react'), mui = require('material-ui'), logindialog = require('./login-dialog.jsx'), raisedbutton = mui.raisedbutton, muithemeprovider = require('material-ui/styles/muithemeprovider'), darkbasetheme = require('material-ui/styles/basethemes/darkbasetheme'); var index = react.createclass({ getchildcontext: function() { return { muitheme: getmuitheme(darkbasetheme), }; }, childcontexttypes: { muitheme: react.proptypes.object }, render: function() { return ( <div classname="mui-app-canvas home-page-background"> <raisedbutton classname="login-button" label="login" ontouchtap={ this._handlelogindialog } linkbutton={ false } /> <logindialog ref="logindialog" loginurl={ this.props.loginurl } /> </div> ) }, _handlelogindialog: function() { this.refs.logindialog.show(); } }); module.exports = index;
best way edit style in material ui edit or write own theme.
here can see implemented themes:
https://github.com/callemall/material-ui/tree/master/src/styles/basethemes
and here editable properties:
https://github.com/callemall/material-ui/blob/master/src/styles/getmuitheme.js
and here how implement it:
Comments
Post a Comment