-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from agentlab/shamilen
Lab 2 menu
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { storiesOf } from '@storybook/react'; | ||
import React from 'react'; | ||
import 'antd/dist/antd.css'; | ||
import { Form, Input, Button, Badge, Menu, Icon } from 'antd'; | ||
import FormItem from 'antd/lib/form/FormItem'; | ||
|
||
class HeadMenu extends React.Component { | ||
state = {}; | ||
|
||
handleClick = (e) => { | ||
console.log('click ', e); | ||
this.setState({ | ||
current: e.key, | ||
}); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Menu onClick={this.handleClick} theme='dark' selectedKeys={[this.state.current]} mode='horizontal'> | ||
<Menu.Item key='test'>Test</Menu.Item> | ||
<Menu.Item key='pipelines'>Pipelines</Menu.Item> | ||
<Menu.Item key='dpu'>DPU Templates</Menu.Item> | ||
<Menu.Item key='monitor'>Execution Monitor</Menu.Item> | ||
<Menu.Item key='scheduler'>Scheduler</Menu.Item> | ||
<Menu.Item key='setting'>Setting</Menu.Item> | ||
<Menu.Item key='user'> | ||
<Icon type='user' /> | ||
User | ||
</Menu.Item> | ||
<Menu.Item key='logout'> | ||
<Icon type='logout' /> | ||
Logout | ||
</Menu.Item> | ||
<Icon type='check' /> | ||
</Menu> | ||
); | ||
} | ||
} | ||
|
||
storiesOf('Head Menu', module).add('Head Menu', () => <HeadMenu />); |