mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
SVG
This commit is contained in:
parent
c10e09c662
commit
74b113c39a
@ -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;
|
||||
Loading…
x
Reference in New Issue
Block a user