Add work page, stylistic changes and dynamic classes to buttons

This commit is contained in:
Moris Zen
2018-07-01 10:55:11 +02:00
parent 0074bc5c9a
commit 6eb6e57165
4 changed files with 21 additions and 6 deletions

View File

@@ -1,9 +1,15 @@
import React from 'react'
import Link from 'gatsby-link'
const Button = ({ text, url, classes}) => (
let defaultClasses = 'px-4 py-2 leading-none inline-block text-sm no-underline uppercase'
let standardBtn = 'border hover:bg-teal hover:text-white hover:border-teal'
let filledBtn = 'text-grey-lightest bg-grey-darkest hover:bg-teal'
const Button = ({ ...props }) => (
<div>
<Link to={url} className={`no-underline inline-block text-sm px-4 py-2 leading-none border rounded text-grey-lightest hover:border-transparent hover:text-white hover:bg-white mt-4 lg:mt-0 uppercase bg-grey-darkest hover:bg-teal ${classes}`}>{text}</Link>
<Link to={props.url} className={`${props.standard ? standardBtn : ''} ${props.filled ? filledBtn : ''} ${defaultClasses} ${props.classes}`}>{props.text}</Link>
</div>
)