forked from p34709852/monkey
Merge branch '400/aggregate-findings' into 400/more-tests
This commit is contained in:
commit
3403d26d70
|
@ -20,23 +20,26 @@ export default class EventsButton extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
return <Fragment>
|
||||||
|
<EventsModal events={this.props.events} showEvents={this.state.isShow} hideCallback={this.hide}
|
||||||
|
exportFilename={this.props.exportFilename}/>
|
||||||
|
<div className="text-center" style={{"display": "grid"}}>
|
||||||
|
<Button className="btn btn-primary btn-lg" onClick={this.show}>
|
||||||
|
<i className="fa fa-list"/> Events {this.createEventsAmountBadge()}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</Fragment>;
|
||||||
|
}
|
||||||
|
|
||||||
|
createEventsAmountBadge() {
|
||||||
let eventsAmountBadge;
|
let eventsAmountBadge;
|
||||||
if (this.props.events.length > 10) {
|
if (this.props.events.length > 10) {
|
||||||
eventsAmountBadge = <Badge>9+</Badge>;
|
eventsAmountBadge = <Badge>9+</Badge>;
|
||||||
} else {
|
} else {
|
||||||
eventsAmountBadge = <Badge>{this.props.events.length}</Badge>;
|
eventsAmountBadge = <Badge>{this.props.events.length}</Badge>;
|
||||||
}
|
}
|
||||||
return <Fragment>
|
return eventsAmountBadge;
|
||||||
<EventsModal events={this.props.events} showEvents={this.state.isShow} hideCallback={this.hide}
|
|
||||||
exportFilename={this.props.exportFilename}/>
|
|
||||||
<div className="text-center" style={{"display": "grid"}}>
|
|
||||||
<Button className="btn btn-primary btn-lg" onClick={this.show}>
|
|
||||||
<i className="fa fa-list"/> Events {eventsAmountBadge}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</Fragment>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EventsButton.propTypes = {
|
EventsButton.propTypes = {
|
||||||
|
|
Loading…
Reference in New Issue