an es2015 iteration on the block Stopwatch from @currankelleher
A stopwatch app constructed using d3-component.
The following components are defined and used to construct the app:
app
buttonPanel
resetButton
reset
action when clicked. startStopButton
button
resetButton
and startStopButton
. timeDisplay
Built with blockbuilder.org
forked from curran's block: Posts with d3-component
xxxxxxxxxx
<head>
<meta charset='utf-8'>
<script src='https://unpkg.com/d3@4'></script>
<script src='https://unpkg.com/d3-component@3'></script>
<script src='https://unpkg.com/redux@3/dist/redux.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.23.1/babel.min.js'></script>
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<style>
body {
text-align: center;
margin-top: 75px;
}
.time-display {
color: #3d3d3d;
font-size: 10em;
font-family: mono;
cursor: default;
}
button {
background-color: #7c7c7c;
border: solid 3px #7c7c7c;
border-radius: 11px;
color: white;
padding: 20px 60px;
margin: 20px;
font-size: 58px;
cursor: pointer;
}
button:hover {
border: solid 3px black;
}
button:focus {
outline: none;
}
</style>
</head>
<body>
<script src='vis.js'></script>
</body>
https://unpkg.com/d3@4
https://unpkg.com/d3-component@3
https://unpkg.com/redux@3/dist/redux.min.js
https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.23.1/babel.min.js