import React, { Component } from 'react'; import './index.less'; import Touch from '@src/containers/Touch'; export default class Button extends Component { render() { const { className = '', width, margin, size = 'basic', theme = 'default', children, onClick, radius, block, } = this.props; return ( <div className={`g-button-wrapper ${className} ${size} ${theme} ${radius ? 'radius' : ''} ${block ? 'block' : ''}`} > <Touch style={{ width: width || 'auto', margin: margin ? `0 ${margin}px` : '' }} className="g-button" onClick={() => onClick && onClick()} > {children} </Touch> </div> ); } }