Skip to content

Commit

Permalink
Merge pull request #37 from chingu-voyage4/feature-pageHeader-#31
Browse files Browse the repository at this point in the history
Feature page header #31
  • Loading branch information
JethroF22 authored Mar 7, 2018
2 parents c151eb5 + 4fa3a33 commit 2166d75
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 26 deletions.
14 changes: 0 additions & 14 deletions src/app.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/app.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import PageHeader from './components/PageHeader';

ReactDOM.render(<PageHeader />, document.getElementById('app'));
17 changes: 17 additions & 0 deletions src/components/PageHeader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';

const PageHeader = () => (
<div>
<img
src="https://i.imgur.com/j7ArnQ5.png"
alt="logo goes here"
style={{ height: '50px', width: '50px', float: 'left' }}
/>
<div style={{ float: 'right' }}>
<button>Sign in</button>
<button>Create account</button>
</div>
</div>
);

export default PageHeader;
28 changes: 16 additions & 12 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
// entry point -> output file

const path = require("path");
const path = require('path');

module.exports = {
entry: "./src/app.js",
entry: './src/app.jsx',
output: {
path: path.join(__dirname, "public"),
filename: "bundle.js"
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
},
module: {
rules: [
{
loader: "babel-loader",
test: /\.js$/,
exclude: /node_modules/
loader: 'babel-loader',
test: /\.jsx?$/,
exclude: /node_modules/,
},
{
test: /\.s?css$/,
use: ["style-loader", "css-loader", "sass-loader"]
}
]
use: ['style-loader', 'css-loader', 'sass-loader'],
},
],
},
devServer: {
contentBase: path.join(__dirname, "public")
}
contentBase: path.join(__dirname, 'public'),
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.json', '.jsx'],
},
};

0 comments on commit 2166d75

Please sign in to comment.