Repository URL to install this package:
|
Version:
7.13.0-rc.3 ▾
|
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Button from './Button';
import ButtonLabel from './ButtonLabel';
import ButtonSubLabel from './ButtonSubLabel';
class IconButton extends Component {
static propTypes = {
label: PropTypes.string.isRequired,
subLabel: PropTypes.string.isRequired,
};
render() {
// Extract the modifier props
// eslint-disable-next-line no-unused-vars, react/prop-types
const { label, subLabel, modifier, ...props } = this.props;
return (
<Button modifier="multiLabelButton" {...props}>
<ButtonLabel>{label}</ButtonLabel>
<ButtonSubLabel>{subLabel}</ButtonSubLabel>
</Button>
);
}
}
export default IconButton;