Redesigned compose form
This commit is contained in:
parent
9bf4c34919
commit
d8c5a83827
21 changed files with 477 additions and 218 deletions
|
|
@ -0,0 +1,31 @@
|
|||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
|
||||
const TextIconButton = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
label: React.PropTypes.string.isRequired,
|
||||
title: React.PropTypes.string,
|
||||
active: React.PropTypes.bool,
|
||||
onClick: React.PropTypes.func.isRequired
|
||||
},
|
||||
|
||||
mixins: [PureRenderMixin],
|
||||
|
||||
handleClick (e) {
|
||||
e.preventDefault();
|
||||
this.props.onClick();
|
||||
},
|
||||
|
||||
render () {
|
||||
const { label, title, active } = this.props;
|
||||
|
||||
return (
|
||||
<button title={title} aria-label={title} className={`text-icon-button ${active ? 'active' : ''}`} onClick={this.handleClick}>
|
||||
{label}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
export default TextIconButton;
|
||||
Loading…
Add table
Add a link
Reference in a new issue