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
updateMocktail = mocktail => { | |
const newMocktail = mocktail; | |
this.setState({ | |
mocktail | |
}) | |
} |
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'; | |
import Spinner from './Spinner'; | |
class Mocktail extends Component { | |
state = { | |
isLoading: false | |
} |
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'; | |
import Mocktail from './Mocktail'; | |
class App extends Component { | |
state = { | |
mocktail: '' | |
} |
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> | |
<head> | |
<title>HTML Dialog Element</title> | |
<link rel="stylesheet" href="dialog-polyfill.css"> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<dialog id="dialogWindow"> | |
<form method="dialog"> |
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> | |
<head> | |
<title>HTML Dialog Element</title> | |
<link rel="stylesheet" href="dialog-polyfill.css"> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<dialog id="dialogWindow"> | |
<form method="dialog"> |
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
(function() { | |
let openDialog = document.getElementById('openDialog'); | |
let openModalDialog = document.getElementById('openModalDialog'); | |
let dialogWindow = document.getElementById('dialogWindow'); | |
dialogPolyfill.registerDialog(dialogWindow); | |
openDialog.addEventListener('click', () => { | |
dialogWindow.show(); |
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
(function() { | |
let openDialog = document.getElementById('openDialog'); | |
let openModalDialog = document.getElementById('openModalDialog'); | |
let dialogWindow = document.getElementById('dialogWindow'); | |
openDialog.addEventListener('click', () => { | |
dialogWindow.show(); | |
}) |
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
(function() { | |
let openDialog = document.getElementById('openDialog'); | |
let openModalDialog = document.getElementById('openModalDialog'); | |
let dialogWindow = document.getElementById('dialogWindow'); | |
openDialog.addEventListener('click', () => { | |
dialogWindow.show(); | |
}) | |
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
(function() { | |
let openDialog = document.getElementById('openDialog'); | |
let openModalDialog = document.getElementById('openModalDialog'); | |
let dialogWindow = document.getElementById('dialogWindow'); | |
})(); | |
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> | |
<head> | |
<title>HTML Dialog Element</title> | |
</head> | |
<body> | |
<dialog id="dialogWindow"> | |
<form method="dialog"> | |
<input type="text"> | |
<button type="submit">OK</button> |