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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://kit.fontawesome.com/a71707a89a.js" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="./style.css"/> | |
<title>Popup Box</title> | |
</head> | |
<body> |
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
var Alert = new CustomAlert(); | |
function CustomAlert(){ | |
this.render = function(){ | |
//Show Modal | |
let popUpBox = document.getElementById('popUpBox'); | |
popUpBox.style.display = "block"; | |
//Close Modal | |
document.getElementById('closeModal').innerHTML = '<button onclick="Alert.ok()">OK</button>'; | |
} |
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
body{ | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
.btn{ | |
position: absolute; | |
top: 50%; | |
left: 50%; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://kit.fontawesome.com/a71707a89a.js" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="./style.css"/> | |
<title>Popup Box</title> | |
</head> |
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
import React, { Component } from 'react'; | |
class App extends Component{ | |
render(){ | |
return( <h1>Hello World</h1> ); | |
}} | |
export default App; |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App.js'; | |
ReactDOM.render(<App />, document.getElementById('app')); |
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
"scripts": { | |
"start": "webpack-dev-server", | |
"build-for-windows": "SET NODE_ENV='development' && webpack" | |
}, | |
"babel": { | |
"presets": [ | |
"@babel/preset-env", | |
"@babel/preset-react" | |
], | |
"plugins": [ |
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
const path = require('path') | |
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
module.exports = { entry: './index.js', output: { path: path.resolve(__dirname, 'dist'), | |
filename: 'index_bundle.js', publicPath: '/' }, | |
module: { rules: [ { test: /\.(js)$/, use: 'babel-loader' }, | |
{ test: /\.css$/, use: [ 'style-loader', 'css-loader' ]} ]}, | |
mode: process.env.NODE === 'production' ? 'production' : 'development', | |
plugins: [ new HtmlWebpackPlugin({ template: './index.html' }) ], | |
devServer: { historyApiFallback: true } } |
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
<!DOCTYPE html> <html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My First App</title> | |
</head> | |
<body> | |
<div id="app"> | |
</div> | |
</body> |
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
{ | |
"name": "my-first-react-app", | |
"version": "1.0.0", | |
"description": "My First React App", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \\"Error: no test specified\\" && exit 1" | |
}, | |
"keywords": \[\], | |
"author": "", |