Permalink
Please sign in to comment.
Browse files
Merge pull request #129 from taion/MenuItem
Add MenuItem to tests
- Loading branch information...
Showing
with
49 additions
and 0 deletions.
- +1 −0 tests/IndexLinkContainer.spec.js
- +1 −0 tests/LinkContainer.spec.js
- +1 −0 tests/visual/Home.js
- +44 −0 tests/visual/MenuItemVisual.js
- +2 −0 tests/visual/index.js
1
tests/IndexLinkContainer.spec.js
1
tests/LinkContainer.spec.js
1
tests/visual/Home.js
44
tests/visual/MenuItemVisual.js
@@ -0,0 +1,44 @@ | ||
+import React from 'react'; | ||
+import ButtonToolbar from 'react-bootstrap/lib/ButtonToolbar'; | ||
+import MenuItem from 'react-bootstrap/lib/MenuItem'; | ||
+import SplitButton from 'react-bootstrap/lib/SplitButton'; | ||
+import {Link} from 'react-router'; | ||
+ | ||
+import LinkContainer from '../../src/LinkContainer'; | ||
+ | ||
+export default () => ( | ||
+ <div> | ||
+ <Link to="/home">Back to Index</Link> | ||
+ <h2>MenuItem</h2> | ||
+ | ||
+ <h3>Baseline</h3> | ||
+ <ButtonToolbar> | ||
+ <SplitButton title="Dropdown"> | ||
+ <MenuItem eventKey="1">Action</MenuItem> | ||
+ <MenuItem eventKey="2" active>Active action</MenuItem> | ||
+ <MenuItem eventKey="3">Another action</MenuItem> | ||
+ <MenuItem divider /> | ||
+ <MenuItem eventKey="4">Separated link</MenuItem> | ||
+ </SplitButton> | ||
+ </ButtonToolbar> | ||
+ | ||
+ <h3>LinkContainer</h3> | ||
+ <ButtonToolbar> | ||
+ <SplitButton title="Dropdown"> | ||
+ <LinkContainer to="/home"> | ||
+ <MenuItem>Action</MenuItem> | ||
+ </LinkContainer> | ||
+ <LinkContainer to="/menu-item"> | ||
+ <MenuItem>Active action</MenuItem> | ||
+ </LinkContainer> | ||
+ <LinkContainer to="/home"> | ||
+ <MenuItem>Another action</MenuItem> | ||
+ </LinkContainer> | ||
+ <MenuItem divider /> | ||
+ <LinkContainer to="/home"> | ||
+ <MenuItem>Separated link</MenuItem> | ||
+ </LinkContainer> | ||
+ </SplitButton> | ||
+ </ButtonToolbar> | ||
+ </div> | ||
+); |
2
tests/visual/index.js
0 comments on commit
dfe8c44