UNPKG

react-zeanium-ui-ui

Version:

Zeanium UI Framework for React.js

38 lines (34 loc) 703 B
require('./Arrow.less'); var React = require('react'); module.exports = React.createClass({ displayName:'Arrow', getDefaultProps: function (){ return { style: '', className: '', type: '_line', diff: 3, dir: 'top', borderColor: '#bbbbbb', backgroundColor: '#ffffff', width: 10 }; }, getInitialState:function(){ return { }; }, componentDidMount:function(){ }, render:function(){ var _style = this.props.style||{}; _style.borderLeftColor = this.props.borderColor; return ( <div className={"c-arrow t-" + this.props.type + ' ' + this.props.className + ' d-' + this.props.dir} style={_style}> { this.props.type=='line' } </div> ); } });