-
Notifications
You must be signed in to change notification settings - Fork 775
/
Copy pathApp.js
116 lines (108 loc) · 2.52 KB
/
App.js
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* eslint max-len: 0 */
import React from 'react';
import { LinkContainer } from 'react-router-bootstrap';
// import 'bootstrap/dist/css/bootstrap.css';
import 'toastr/build/toastr.min.css';
import '../../../css/react-bootstrap-table.css';
// import 'jquery';
// import 'bootstrap';
import {
Navbar,
NavBrand,
Nav,
NavItem,
NavDropdown,
MenuItem,
Grid,
Row,
Col
} from 'react-bootstrap';
class App extends React.Component {
static propTypes = {
children: React.PropTypes.node
};
static defaultProps = {};
constructor(props) {
super(props);
this.state = {};
}
render() {
const examples = [ {
text: 'Basic Table',
href: 'basic'
}, {
text: 'Custom Data Access',
href: 'custom-data-access'
}, {
text: 'Work on Column',
href: 'column'
}, {
text: 'Table Sort',
href: 'sort'
}, {
text: 'Column Format',
href: 'column-format'
}, {
text: 'Column Filter',
href: 'column-filter'
}, {
text: 'Row Selection',
href: 'selection'
}, {
text: 'Pagination',
href: 'pagination'
}, {
text: 'Table Manipulation',
href: 'manipulation'
}, {
text: 'Cell Edit',
href: 'cell-edit'
}, {
text: 'Table Styling',
href: 'style'
}, {
text: 'Remote Data',
href: 'remote'
}, {
text: 'Advance data edit&insert',
href: 'advance'
}, {
text: 'Other',
href: 'others'
}, {
text: 'A complex demo',
href: 'complex'
} ];
const exampleMenuItems = examples.map((item, idx) => {
return (
<LinkContainer key={ idx } to={ '/examples/' + item.href }>
<MenuItem key={ idx }>{ item.text }</MenuItem>
</LinkContainer>
);
});
return (
<div>
<Navbar inverse toggleNavKey={ 0 }>
<NavBrand><a href='#'>react-bootstrap-table</a></NavBrand>
<Nav>
<LinkContainer to='/getting-started'>
<NavItem>Getting started</NavItem>
</LinkContainer>
<NavDropdown title='Examples' id='collapsible-navbar-dropdown'>
{ exampleMenuItems }
</NavDropdown>
<NavItem href='https://github.com/AllenFang/react-bootstrap-table' target='_blank'>GitHub</NavItem>
</Nav>
</Navbar>
<Grid fluid>
<Row>
<Col md={ 12 }>
{ this.props.children }
</Col>
</Row>
</Grid>
</div>
);
}
}
export default App;