Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 9c8fa2e

Browse files
committed
extended example menu with descriptions
1 parent 20e93cf commit 9c8fa2e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ You can run the examples with `yarn run examples` and the tests with `yarn test`
8686
## License
8787
[MIT License](/LICENSE)
8888

89-
Copyright (c) 2017 Catalysts GmbH
89+
Copyright (c) 2017 Catalysts GmbH

examples/index.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const menuEntries = [
1919
{
2020
path: '/login',
2121
component: Login,
22-
text: 'Login'
22+
text: 'Login',
23+
description: ' (Dynamic submit button)'
2324
},
2425
{
2526
path: '/registration',
@@ -36,13 +37,15 @@ class App extends React.Component {
3637
<div>
3738
<div className="col-md-2 sidebar">
3839
<div className="list-group">
39-
<span className="list-group-item">
40-
<a href="https://github.com/cat-react/form"><b>@cat-react/form</b></a> Examples
41-
</span>
40+
<span className="list-group-item">
41+
<a href="https://github.com/cat-react/form"><b>@cat-react/form</b></a> Examples
42+
</span>
4243
{menuEntries.map((entry, index) => {
4344
const replace = entry.path === window.location.hash.replace('#', '');
44-
return <Link key={index} className="list-group-item nav-link" to={entry.path}
45-
replace={replace}>{entry.text}</Link>;
45+
return <span key={index} className="list-group-item">
46+
<Link className="nav-link" to={entry.path} replace={replace}>{entry.text}</Link>
47+
{entry.description}
48+
</span>;
4649
})}
4750
</div>
4851
</div>

0 commit comments

Comments
 (0)