Skip to content

Commit

Permalink
feat(title): add menu to header
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Moreno Cantero committed May 6, 2020
1 parent f4b5477 commit a59e90b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"comma-dangle": ["error", "only-multiline"],
"react/prefer-stateless-function": "off",
"object-curly-newline": ["error", { "multiline": true }],
"max-len": "off"
"max-len": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-indent-props": "off"
}
}
16 changes: 11 additions & 5 deletions src/components/title/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import React, { Component } from 'react';
import { Layout } from 'antd';
import { Layout, Menu } from 'antd';
import { Link } from 'react-router-dom';

const { Header } = Layout;

export default class Title extends Component {
render() {
const { title } = this.props;
return (
<Header>
<div className="logo">
{title}
</div>
<div className="logo" />
<Menu theme="dark" mode="horizontal" defaultSelectedKeys={['1']}>
<Menu.Item key="1">
<Link to="/">Cellar</Link>
</Menu.Item>
<Menu.Item key="2">
<Link to="add">Add</Link>
</Menu.Item>
</Menu>
</Header>
);
}
Expand Down

0 comments on commit a59e90b

Please sign in to comment.