This commit is contained in:
tengge1 2019-05-26 09:44:18 +08:00
parent c10e09c662
commit 74b113c39a

View File

@ -5,14 +5,15 @@ import PropTypes from 'prop-types';
/**
* SVG
* @author tengge / https://github.com/tengge1
* @property {String} className 样式类
* @property {Object} style 样式
*/
class SVG extends React.Component {
render() {
const { className, style } = this.props;
const { className, style, ...others } = this.props;
return <svg className={classNames('SVG', className)} style={style}></svg>;
return <svg
className={classNames('SVG', className)}
style={style}
{...others}></svg>;
}
}
@ -21,4 +22,9 @@ SVG.propTypes = {
style: PropTypes.object,
};
SVG.defaultProps = {
className: null,
style: null,
};
export default SVG;