material-ui
Version:
Material Design UI components built with React
44 lines (33 loc) • 862 B
JSX
let React = require('react');
let Transitions = require('./styles/transitions');
let StylePropable = require('./mixins/style-propable');
let InkBar = React.createClass({
contextTypes: {
muiTheme: React.PropTypes.object,
},
propTypes: {
left: React.PropTypes.string.isRequired,
width: React.PropTypes.string.isRequired,
},
mixins: [StylePropable],
render() {
let palette = this.context.muiTheme.palette;
let styles = this.mergeAndPrefix({
left: this.props.left,
width: this.props.width,
bottom: 0,
display: 'block',
backgroundColor: palette.accent1Color,
height: 2,
marginTop: -2,
position: 'relative',
transition: Transitions.easeOut('1s', 'left'),
});
return (
<div style={styles}>
</div>
);
},
});
module.exports = InkBar;