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 polarToCartesian(centerX, centerY, radius, angleInDegrees) { | |
var angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0; | |
return { | |
x: centerX + radius * Math.cos(angleInRadians), | |
y: centerY + radius * Math.sin(angleInRadians) | |
}; | |
} | |
function describeArc(x, y, radius, startAngle, endAngle) { |
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 url('https://fonts.googleapis.com/css?family=Lato'); | |
* { | |
box-sizing: border-box; | |
} | |
body { | |
font-family: 'Lato', sans-serif; | |
} |
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 moment from 'moment'; | |
class Countdown extends React.Component { | |
state = { | |
days: undefined, | |
hours: undefined, | |
minutes: undefined, | |
seconds: undefined | |
}; |
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'; | |
class Countdown extends React.Component { | |
state = { | |
days: undefined, | |
hours: undefined, | |
minutes: undefined, | |
seconds: undefined | |
}; |
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 moment from 'moment'; | |
const then = moment(timeTillDate, timeFormat); | |
const now = moment(); | |
const countdown = moment(then - now); | |
const days = countdown.format('D'); | |
const hours = countdown.format('HH'); | |
const minutes = countdown.format('mm'); | |
const seconds = countdown.format('ss'); |
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 moment from 'moment'; | |
const then = moment(timeTillDate, timeFormat); | |
const now = moment(); | |
const countdown = moment(then - now); |
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
.btn-large { | |
font-size: 16px; | |
padding: 12px 36px; | |
} | |
.btn-small { | |
font-size: 12px; | |
padding: 4px 12px; | |
} |
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
:root { | |
--primary-color: #3457dc; | |
--secondary-color: #ea4d67; | |
--tertiary-color: #ea674d; | |
} |
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
.btn-primary { | |
border-color: var(--primary-color); | |
background-color: var(--primary-color); | |
} | |
.btn-primary:disabled { | |
color: var(--primary-color); | |
} | |
.btn-primary:focus { |
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
.btn-hover, | |
.btn:hover { | |
opacity: 0.9; | |
} | |
.btn:disabled { | |
background-color: transparent; | |
cursor: not-allowed; | |
opacity: 0.7; | |
} |