diff --git a/package-lock.json b/package-lock.json index 95cbe21246f475cd831ecc5494e15604ac8347a4..54eedbaeb0c76d07b8afa7e0a08054239578c0e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9716,16 +9716,16 @@ } }, "grommet": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/grommet/-/grommet-2.16.3.tgz", - "integrity": "sha512-q/je53d5AoCpokqXIJHzIIXpRMej9cjsdGt/BkWbTizF+36OWQ67Aqw8f4kK8YfAOxZ267gRj1Y1mDFva3duYw==", + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/grommet/-/grommet-2.17.1.tgz", + "integrity": "sha512-ULHivqDHiMtHMXfPiyyL9yct0n9a6S9V+Azs9B4Ukjy6Zvp02gTzVve3K/q/IyBagD7EP3AGHuqwMZUxiJL15w==", "requires": { "grommet-icons": "^4.5.0", "hoist-non-react-statics": "^3.2.0", "markdown-to-jsx": "^6.11.4", "polished": "^3.4.1", "prop-types": "^15.7.2", - "react-desc": "^4.1.2" + "react-desc": "^4.1.3" } }, "grommet-icons": { @@ -14908,9 +14908,9 @@ } }, "react-desc": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/react-desc/-/react-desc-4.1.2.tgz", - "integrity": "sha512-JAVe89uaLr0HZ0IKodnpTPNgNyJ/SPDQnl3VJPVwI+SpebmHvJiBNZEOwX201QmSbsVGqRY8ql/VFPlAx85WzA==" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/react-desc/-/react-desc-4.1.3.tgz", + "integrity": "sha512-XqfNsg+nvAO77ja5+v3J6bMS7drnWozpiA64bUTyhqvSCJRkq45FiONl7/+74OjPw4Id6qbqVX6xkER/yTU8+w==" }, "react-dev-utils": { "version": "4.2.3", diff --git a/package.json b/package.json index 65442467b7b08e2d31b18c86450a0a46d902d046..52263f0f6d9a5f3c4e0ffd950e4391ef79e6f2a5 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "gatsby-transformer-remark": "^2.16.1", "gatsby-transformer-sharp": "^2.12.0", "gatsby-transformer-yaml": "^3.0.0", - "grommet": "^2.16.3", + "grommet": "^2.17.1", "grommet-icons": "^4.5.0", "prop-types": "^15.7.2", "react": "^16.12.0", diff --git a/src/components/ContactForm.js b/src/components/ContactForm.js index 56ec27b1c41c6dedcc94335d0568cd6aade8ea23..51f21b1850f0840fc85ee636ec774d914118ce83 100644 --- a/src/components/ContactForm.js +++ b/src/components/ContactForm.js @@ -1,67 +1,194 @@ import React, { useState } from 'react'; -import { Box, Heading, Text, Form, FormField, TextInput } from 'grommet'; +import { + Box, + Heading, + Text, + Form, + FormField, + TextInput, + TextArea, + Spinner, +} from 'grommet'; import { PrimaryButton } from './core'; +const korolevFont = 'korolev, Helvetica Neue, Helvetica, Arial, sans-serif'; + const ContactForm = () => { - const [value, setValue] = useState({}); + const [submitting, setSubmitting] = useState(); + const [success, setSuccess] = useState(); + + const handleSubmit = (event) => { + const data = new FormData(event.target); + setSubmitting(true); + fetch( + 'https://docs.google.com/forms/d/e/1FAIpQLScsfrAHD8yKJGKF-yI_T9676FR-LDmmuBG_m8uY2TmP_zmZUg/formResponse', + { + mode: 'no-cors', // we don't care about the result of this request, so just do it. + method: 'POST', + body: data, + } + ).then((res) => { + setSubmitting(false); + setSuccess(true); + }); + }; + return ( - - Request a consultation + + REQUEST A CONSULTATION - - Use this form to get going. We'll get in touch-to-discuss the details. - -
setValue(nextValue)} - onReset={() => setValue({})} - onSubmit={(event) => { - const data = new FormData(event.target); - fetch( - 'https://docs.google.com/forms/u/0/d/e/1FAIpQLScV4doNjISIN1IyjI8gdyv7bUsaMvAFuEkwDy-I5IyicZJSYw/formResponse', - { - mode: 'no-cors', // we don't care about the result of this request, so just do it. - method: 'POST', - body: data, - } - ); - }} - > - - Required* - - - - - - - - + + + We'd love to talk. + {' '} + Tell us how we can reach you and what services you're interested + in, and someone from our team will reach out soon. + + + Submit{' '} + + unclassified + {' '} + data only. + + + + Name{' '} + + (required) + + + } + required + > + + + + Email address{' '} + + (required) + + + } + required + > + + + + Services or solutions you are interested in{' '} + + (optional) + + + } + > + + + + Comments or details{' '} + + (optional) + + + } + > +