Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 42 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 0 |
1 | import * as mdc from 'material-components-web'; |
||
2 | import React from 'react'; |
||
3 | import ReactDOM from 'react-dom'; |
||
4 | import Model from './SideMenu/Model'; |
||
5 | |||
6 | export interface IProperties { |
||
7 | model: Model |
||
8 | } |
||
9 | |||
10 | interface IState { |
||
11 | } |
||
12 | |||
13 | export default class SideMenu extends React.Component<IProperties, IState> { |
||
14 | drawer: mdc.drawer.MDCDrawer | undefined; |
||
15 | |||
16 | componentDidMount(): void { |
||
17 | // @ts-ignore |
||
18 | 2 | this.drawer = new mdc.drawer.MDCDrawer(ReactDOM.findDOMNode(this)); |
|
19 | } |
||
20 | |||
21 | render(): React.ReactElement { |
||
22 | 3 | this.drawer && (this.drawer.open = this.props.model.isOpen); |
|
23 | 3 | return <aside className="mdc-drawer mdc-drawer--dismissible mdc-top-app-bar--fixed-adjust"> |
|
24 | <div className="mdc-drawer__content"> |
||
25 | <nav className="mdc-list"> |
||
26 | <a className="mdc-list-item mdc-list-item--activated" href="#" aria-current="page"> |
||
27 | <i className="material-icons mdc-list-item__graphic" aria-hidden="true">inbox</i> |
||
28 | <span className="mdc-list-item__text">Inbox</span> |
||
29 | </a> |
||
30 | <a className="mdc-list-item" href="#"> |
||
31 | <i className="material-icons mdc-list-item__graphic" aria-hidden="true">send</i> |
||
32 | <span className="mdc-list-item__text">Outgoing</span> |
||
33 | </a> |
||
34 | <a className="mdc-list-item" href="#"> |
||
35 | <i className="material-icons mdc-list-item__graphic" aria-hidden="true">drafts</i> |
||
36 | <span className="mdc-list-item__text">Drafts</span> |
||
37 | </a> |
||
38 | </nav> |
||
39 | </div> |
||
40 | </aside>; |
||
41 | } |
||
42 | } |