Permalink
Browse files

Prepare the app for the semantic layout

  • Loading branch information...
lucapette committed Feb 10, 2017
1 parent c053e8f commit 4ef66b9e83ea1948322de6f7ef7bc004d5043ab0
Showing with 43 additions and 13 deletions.
  1. +1 −0 package.json
  2. +1 −9 src/App.js
  3. +27 −3 src/Layout.js
  4. +1 −1 webpack.config.js
  5. +13 −0 yarn.lock
View
@@ -10,6 +10,7 @@
"babel-cli": "^6.22.2",
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.22.0",
View
@@ -4,18 +4,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import Layout from './Layout';
import { Button } from 'semantic-ui-react';
import 'semantic-ui-css/semantic.css';
import 'semantic-ui-css/semantic.js';
const ButtonExampleEmphasis = () => (
<div>
<Button primary>Primary</Button>
<Button secondary>Secondary</Button>
</div>
)
const mountNode = document.getElementById('root');
ReactDOM.render(<ButtonExampleEmphasis />, mountNode);
ReactDOM.render(<Layout />, mountNode);
View
@@ -1,8 +1,32 @@
//@flow
import React from 'react';
import React, { Component } from 'react'
import { Menu, Segment, Icon } from 'semantic-ui-react'
export default class Layout extends Component {
handleItemClick = (e, item) =>
console.log(item)
export default class Layout extends React.Component {
render() {
return <h1>Hello world!</h1>
return (
<div>
<Segment attached>
This is a segment
</Segment>
<Menu icon='labeled' compact attached='bottom'>
<Menu.Item
onClick={this.handleItemClick}>
<Icon name='video play outline' />
Start
</Menu.Item>
<Menu.Item
onClick={this.handleItemClick}>
<Icon name='bar chart' />
Stats
</Menu.Item>
</Menu>
</div>
)
}
}
View
@@ -15,7 +15,7 @@ const config = {
loader: 'babel-loader',
options: {
presets: ["es2015", "react"],
plugins: ["transform-flow-strip-types"]
plugins: ["transform-flow-strip-types", "transform-class-properties"]
},
exclude: /node_modules/
},
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 4ef66b9

Please sign in to comment.