diff --git a/.gitignore b/.gitignore index 392a1ca..16136c6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* +statickit.json \ No newline at end of file diff --git a/components/ContactForm/index.js b/components/ContactForm/index.js new file mode 100644 index 0000000..4e7fb04 --- /dev/null +++ b/components/ContactForm/index.js @@ -0,0 +1,99 @@ +import React from 'react' +import styled from 'styled-components' +import { designTokens } from '../Theme/designTokens' +import { useForm, ValidationError } from '@statickit/react'; + +const FormButton = styled.button` + font-family: inherit; + border: 1px solid var(--primary); + background: var(--primaryTransparent); + color: var(--primaryDark); + display: block; + width: 100%; + padding: ${designTokens.space[3]}; + border-radius: ${designTokens.space[1]}; + margin-top: ${designTokens.space[4]}; + cursor: pointer; + transition: all 120ms ease-out 0s; + &:hover, &:focus { + border-color: var(--primaryTransparent); + } +` + +const EmptyStateIcon = styled.div` + display: inline-flex; + background: var(--primaryTransparent); + color: var(--primary); + align-items: center; + justify-content: center; + width: ${designTokens.space[7]}; + height: ${designTokens.space[7]}; + margin-bottom: ${designTokens.space[2]}; + border-radius: 50%; +` + +const EmptyState = styled.div` + display: flex; + align-items: center; + flex-direction: column; +` + +export default function ContactForm() { + + const [state, handleSubmit] = useForm("contactForm"); + if (state.succeeded) { + return( + + + + + + +

Message Sent!

+
+ ) + } + + return( +
+

Do you have feedback about this post or want to suggest an idea you'd like to hear about in a future post? Send me a message!

+ +