Created
July 11, 2020 18:52
-
-
Save pedronauck/388eec000de34316ba7471b038256eaf to your computer and use it in GitHub Desktop.
Tailwind (with twin.macro), Emotion, NextJS and ChakraUI
This file contains hidden or 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
/** @jsx jsx */ | |
import { jsx, css } from '@emotion/core' | |
import tw from 'twin.macro' | |
import { Button, Input } from 'systems/Core' | |
export const Subscribe: React.FC = () => { | |
return ( | |
<div css={styles.Root}> | |
<h4>Subscribe to our newsletter</h4> | |
<div> | |
The latest news, articles, and resources, sent to your inbox weekly. | |
</div> | |
<form> | |
<Input type="email" placeholder="Enter your email" /> | |
<Button intent="primary">Register</Button> | |
</form> | |
</div> | |
) | |
} | |
const styles = { | |
Root: css` | |
${tw`mt-4`}; | |
h4 { | |
${tw`text-xs text-gray-600 mb-1`}; | |
} | |
div { | |
${tw`text-sm text-gray-500`}; | |
} | |
form { | |
${tw`flex mt-3`}; | |
} | |
input { | |
${tw`max-w-xs`}; | |
} | |
button { | |
${tw`ml-4`}; | |
} | |
`, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment