Repository URL to install this package:
|
Version:
8.1.0-rc.5 ▾
|
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Icon from '../../visuals/Icon/Icon';
class ButtonIcon extends Component {
static propTypes = {
icon: PropTypes.any.isRequired,
className: PropTypes.string,
dimension: PropTypes.oneOf(['small']),
semantic: PropTypes.string,
};
static defaultProps = {
dimension: null,
semantic: null,
className: '',
};
render() {
const { icon, dimension, semantic, className } = this.props;
return <Icon className={`Button-icon ${className}`} dimension={dimension} icon={icon} semantic={semantic} />;
}
}
export default ButtonIcon;