Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
3 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,64 @@ | ||
//@flow | ||
import React, { Component } from 'react' | ||
import { List, Segment, Form, Input } from 'semantic-ui-react' | ||
|
||
export default class ContentPanel extends Component { | ||
handleClick = (e, item) => { | ||
console.log(item.name) | ||
} | ||
|
||
currentPanel = () => { | ||
switch(this.props.page) { | ||
case "home": | ||
return ( | ||
<List selection divided size="big"> | ||
<List.Item name="Category 1" onClick={this.handleClick}> | ||
<List.Content> | ||
Category 1 | ||
</List.Content> | ||
</List.Item> | ||
<List.Item name="Category 2" onClick={this.handleClick}> | ||
<List.Content> | ||
Category 2 | ||
</List.Content> | ||
</List.Item> | ||
<List.Item> | ||
<List.Content> | ||
<Input icon="add" fluid placeholder="New category..." transparent/> | ||
</List.Content> | ||
</List.Item> | ||
</List> | ||
) | ||
case "run": | ||
return ( | ||
<List selection divided size="big"> | ||
<List.Item name="Note 1" onClick={this.handleClick}> | ||
<List.Content> | ||
Note one | ||
</List.Content> | ||
</List.Item> | ||
<List.Item name="Note 2" onClick={this.handleClick}> | ||
<List.Content> | ||
Note two | ||
</List.Content> | ||
</List.Item> | ||
<List.Item> | ||
<List.Content> | ||
<Input icon="add" fluid placeholder="New note" transparent/> | ||
</List.Content> | ||
</List.Item> | ||
</List> | ||
) | ||
} | ||
} | ||
|
||
render() { | ||
return ( | ||
<Segment attached id="content"> | ||
<Form> | ||
{this.currentPanel()} | ||
</Form> | ||
</Segment> | ||
) | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
} | ||
#content { | ||
min-height: 450px; | ||
padding: 0px; | ||
} | ||
/* | ||
* This is needed because of this bug: | ||
|