import React from 'react';
import PropTypes from 'prop-types';
import { Button, Tooltip } from 'reactstrap';
const propTypes = {
id: PropTypes.string.isRequired,
icon: PropTypes.string.isRequired,
text: PropTypes.string.isRequired,
onClick: PropTypes.func,
tag: PropTypes.string,
href: PropTypes.string
};
class IconButton extends React.Component {
constructor(props) {
super(props);
this.state = {
tooltipOpen: false
};
}
toggle = () => {
this.setState({
tooltipOpen: !this.state.tooltipOpen
});
}
render() {
const className = 'btn-icon';
const btnContent = (
{this.props.text}
);
if (this.props.tag && this.props.tag == 'a') {
return (
);
} else {
return (
);
}
}
}
IconButton.propTypes = propTypes;
export default IconButton;