mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
[eslint] updated eslintrc and improved the code (#4702)
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button, Tooltip } from 'reactstrap';
|
||||
|
||||
const propTypes = {
|
||||
const propTypes = {
|
||||
id: PropTypes.string.isRequired,
|
||||
icon: PropTypes.string.isRequired,
|
||||
text: PropTypes.string.isRequired,
|
||||
@@ -15,19 +15,19 @@ class IconButton extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
this.state = {
|
||||
tooltipOpen: false
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
toggle = () => {
|
||||
this.setState({
|
||||
tooltipOpen: !this.state.tooltipOpen
|
||||
});
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const className = 'btn-icon';
|
||||
const btnContent = (
|
||||
const btnContent = (
|
||||
<React.Fragment>
|
||||
<span className={this.props.icon}></span>
|
||||
<Tooltip
|
||||
|
Reference in New Issue
Block a user