/* @flow */ import React from 'react'; import { Component, PropTypes } from '../../libs'; export default class Button extends Component { onClick(e: SyntheticEvent): void { if (!this.props.loading) { this.props.onClick && this.props.onClick(e); } } render(): React.DOM { return ( ) } } Button.propTypes = { onClick: PropTypes.func, type: PropTypes.string, size: PropTypes.string, icon: PropTypes.string, nativeType: PropTypes.string, loading: PropTypes.bool, disabled: PropTypes.bool, plain: PropTypes.bool } Button.defaultProps = { type: 'default', nativeType: 'button', loading: false, disabled: false, plain: false };