-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProjectGridFilter.js
More file actions
35 lines (31 loc) · 1.19 KB
/
Copy pathProjectGridFilter.js
File metadata and controls
35 lines (31 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React, { Component } from 'react';
import { ButtonToolbar, ButtonGroup, Button } from 'react-bootstrap';
import { filterGrid, downloadProjectDataCSV } from './ProjectGridActions';
class ProjectGridFilter extends Component {
setFilter(filterType) {
filterGrid(filterType);
}
downloadCSV() {
downloadProjectDataCSV();
}
render() {
return (
<div className="project-grid-filter">
<ButtonToolbar>
<ButtonGroup>
<Button active={this.props.activeFilter === 'All'} onClick={this.setFilter.bind(this, 'All')}>All</Button>
<Button active={this.props.activeFilter === 'Live'} onClick={this.setFilter.bind(this, 'Live')}>Live</Button>
<Button active={this.props.activeFilter === 'In Progress'} onClick={this.setFilter.bind(this, 'In Progress')}>In Progress</Button>
</ButtonGroup>
<ButtonGroup>
<button className="btn btn-link btn-csv-download" onClick={this.downloadCSV.bind(this)}>
<i className="fa fa-download icon"></i>
Download Project Data CSV
</button>
</ButtonGroup>
</ButtonToolbar>
</div>
)
}
}
export default ProjectGridFilter;