-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbc49e2
commit 596e01c
Showing
5 changed files
with
140 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
'use strict' | ||
|
||
// Packages | ||
import PropTypes from 'prop-types' | ||
import classNames from 'classnames' | ||
import Link from 'next/link' | ||
|
||
// Theme | ||
import { colors, typography } from './../theme' | ||
|
||
const ButtonLink = ({ children, onClick, color, href }) => { | ||
const classnames = classNames(color) | ||
|
||
return ( | ||
<button className={classnames} onClick={onClick}> | ||
<Link prefetch href={href}> | ||
<span>{children}</span> | ||
</Link> | ||
|
||
<style jsx>{` | ||
button { | ||
width: 100%; | ||
height: 40px; | ||
background-color: ${colors.white}; | ||
color: ${colors.black}; | ||
border: none; | ||
font-weight: ${typography.semibold}; | ||
font-size: ${typography.f10}; | ||
cursor: pointer; | ||
text-transform: uppercase; | ||
letter-spacing: 2px; | ||
outline: none; | ||
} | ||
span { | ||
color: ${colors.black}; | ||
} | ||
.dark { | ||
background-color: ${colors.black}; | ||
color: ${colors.white}; | ||
} | ||
.dark span { | ||
color: ${colors.white}; | ||
} | ||
`}</style> | ||
</button> | ||
) | ||
} | ||
|
||
ButtonLink.defaultProps = { | ||
onClick: null, | ||
href: '/home' | ||
} | ||
|
||
ButtonLink.propTypes = { | ||
children: PropTypes.node, | ||
onClick: PropTypes.func, | ||
href: PropTypes.string.isRequired | ||
} | ||
|
||
export default ButtonLink |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
'use strict' | ||
|
||
// Packages | ||
import { Component } from 'react' | ||
|
||
// Layouts | ||
import Page from './../layouts/page' | ||
|
||
// Components | ||
import Row from './../components/row' | ||
import ButtonLink from './../components/button-link' | ||
|
||
// Theme | ||
import { colors, typography } from './../theme' | ||
|
||
class Onboard extends Component { | ||
render() { | ||
return ( | ||
<Page> | ||
<Row> | ||
<section> | ||
<h1> | ||
Welcome to <span>Taskr</span> | ||
</h1> | ||
|
||
<div> | ||
<ButtonLink href="/signup">Pro — 14 days free trial</ButtonLink> | ||
<ButtonLink href="/home?tab=Today" color="dark"> | ||
Continue on free version | ||
</ButtonLink> | ||
</div> | ||
</section> | ||
</Row> | ||
|
||
<style jsx>{` | ||
section { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 580px; | ||
justify-content: space-between; | ||
padding-top: 200px; | ||
padding-bottom: 30px; | ||
} | ||
h1 { | ||
color: ${colors.white}; | ||
font-weight: ${typography.thin}; | ||
font-size: 40px; | ||
line-height: 50px; | ||
} | ||
span { | ||
font-weight: ${typography.bold}; | ||
} | ||
`}</style> | ||
</Page> | ||
) | ||
} | ||
} | ||
|
||
export default Onboard |
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