diff --git a/app/components/Navigation.js b/app/components/Navigation.js new file mode 100644 index 0000000..79f8c14 --- /dev/null +++ b/app/components/Navigation.js @@ -0,0 +1,73 @@ +import React from 'react' +import { connect as connectFela } from 'react-fela' +import { not } from 'ramda' +import AppBar from 'material-ui/AppBar' +import Drawer from 'material-ui/Drawer' +import MenuItem from 'material-ui/MenuItem' +import Divider from 'material-ui/Divider' +import { withState, withHandlers, compose } from 'recompose' + +import styles from '../styles/Navigation' +import { FormattedMessage } from '../../lib/Intl' + +function Navigation (props) { + const { styles, isDrawerOpen, toggleDrawer } = props + + return ( +
+ + } + onLeftIconButtonTouchTap={toggleDrawer} + /> + + + + + + + + +
+ ) +} + +export default compose( + connectFela(styles), + withState('isDrawerOpen', 'setDrawerOpen', false), + withHandlers({ + toggleDrawer: ({ setDrawerOpen }) => () => setDrawerOpen(not) + }) +)(Navigation) diff --git a/app/locales/en.json b/app/locales/en.json index 9b2dd03..5edf89f 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -1,5 +1,8 @@ { "app.name": "Cobuy", + "app.closeMenu": "close menu", + "app.dashboard": "dashboard", + "app.logOut": "log out", "agents.nameLabel": "name", "agents.descriptionLabel": "description", "agents.logout": "log out", diff --git a/app/stories/Navigation.js b/app/stories/Navigation.js new file mode 100644 index 0000000..d95d473 --- /dev/null +++ b/app/stories/Navigation.js @@ -0,0 +1,9 @@ +import React from 'react' +import { storiesOf } from '@storybook/react' + +import Navigation from '../components/Navigation' + +storiesOf('app.Navigation', module) + .add('default', () => ( + + )) diff --git a/app/stories/index.js b/app/stories/index.js index 2a246c4..0f3d7c3 100644 --- a/app/stories/index.js +++ b/app/stories/index.js @@ -1,3 +1,4 @@ require('./Button') require('./TextField') require('./AvatarField') +require('./Navigation') diff --git a/app/styles/Navigation.js b/app/styles/Navigation.js new file mode 100644 index 0000000..092fd57 --- /dev/null +++ b/app/styles/Navigation.js @@ -0,0 +1,6 @@ +export default { + container: (props) => ({}), + labelText: () => ({ + textTransform: 'capitalize' + }) +}