-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
90 additions
and
27 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,11 +1 @@ | ||
/** | ||
* Implement Gatsby's Browser APIs in this file. | ||
* | ||
* See: https://www.gatsbyjs.org/docs/browser-apis/ | ||
*/ | ||
|
||
// You can delete this file if you're not using it | ||
|
||
import 'tailwindcss/dist/base.min.css'; | ||
import 'tailwindcss/dist/components.css'; | ||
import 'tailwindcss/dist/utilities.css'; | ||
import './src/index.css'; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
module.exports = () => ({ | ||
plugins: [require('tailwindcss'), require('autoprefixer')], | ||
}); |
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 |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import React from 'react'; | ||
import tw, { styled } from 'twin.macro'; | ||
import { Button } from '~/components/ui/controls/Button'; | ||
|
||
const HeadlineContainer = styled.div` | ||
${tw`flex justify-between`} | ||
const Root = styled.header` | ||
${tw`bg-gray-200 py-5`} | ||
`; | ||
|
||
const Container = styled.div` | ||
${tw`container flex justify-between items-center`} | ||
`; | ||
|
||
export default function Headline() { | ||
return ( | ||
<HeadlineContainer> | ||
<span>Here</span> | ||
<div>Another one</div> | ||
</HeadlineContainer> | ||
<Root> | ||
<Container> | ||
<span>Here</span> | ||
<Button>CONTACT ME</Button> | ||
</Container> | ||
</Root> | ||
); | ||
} |
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,38 @@ | ||
import React from 'react'; | ||
import 'twin.macro'; | ||
|
||
type Props = { | ||
size?: 'sm' | 'lg'; | ||
bgColor?: string; | ||
rounded?: boolean; | ||
textColor?: string; | ||
children: any; | ||
}; | ||
export const Button: React.FC<Props> = ({ | ||
size = 'sm', | ||
bgColor = 'cta', | ||
textColor = 'white', | ||
children, | ||
rounded = true, | ||
}) => { | ||
const sizeClass = | ||
{ | ||
sm: 'text-xs', | ||
lg: 'text-xl', | ||
}[size] || ''; | ||
|
||
let bgClass = ''; | ||
if (bgColor) { | ||
bgClass = `bg-${bgColor}`; | ||
} | ||
|
||
return ( | ||
<button | ||
className={`${bgClass} text-${textColor} ${sizeClass} font-semibold py-2 px-4 ${ | ||
rounded ? 'rounded' : '' | ||
}`} | ||
> | ||
{children} | ||
</button> | ||
); | ||
}; |
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,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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