Files
flood/client/source/scripts/components/icons/BaseIcon.js
2016-02-10 23:41:00 -08:00

29 lines
518 B
JavaScript

import React from 'react';
export default class BaseIcon extends React.Component {
getViewBox() {
let viewBox = this.props.viewBox;
if (this.props.size && this.props.size === 'mini') {
viewBox = '0 0 8 8';
}
return viewBox;
}
getXmlns() {
return 'http://www.w3.org/2000/svg';
}
}
BaseIcon.defaultProps = {
className: '',
viewBox: '0 0 60 60'
};
BaseIcon.propTypes = {
className: React.PropTypes.string,
size: React.PropTypes.string,
viewBox: React.PropTypes.string
};