-
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
4 changed files
with
265 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import MyInput from 'Components/Common/Form/input' | ||
import Button from 'Components/Common/Button' | ||
import FormBase from 'Components/Common/Form' | ||
|
||
const ContactForm = props => { | ||
return ( | ||
<FormBase | ||
initialValues={{ fName: '', lName: '', email: '', message: '' }} | ||
onSubmit={(values, { setSubmitting }) => { | ||
// add submit action here | ||
}} | ||
validate={values => { | ||
const errors = {} | ||
if (!values.email) { | ||
errors.email = 'Required' | ||
} else if ( | ||
!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.email) | ||
) { | ||
errors.email = 'Invalid email address' | ||
} | ||
|
||
if (!values.fName) { | ||
errors.fName = 'Required' | ||
} | ||
if (!values.lName) { | ||
errors.lName = 'Required' | ||
} | ||
if (!values.message) { | ||
errors.message = 'Required' | ||
} | ||
return errors | ||
}} | ||
> | ||
<MyInput | ||
id='fName' | ||
type='text' | ||
name='fName' | ||
label='first name' | ||
placeholder='your first name' | ||
/> | ||
<MyInput | ||
id='lName' | ||
type='text' | ||
name='lName' | ||
label='last name' | ||
placeholder='your last name' | ||
/> | ||
<MyInput | ||
id='email' | ||
type='email' | ||
name='email' | ||
label='email' | ||
placeholder='your email address' | ||
/> | ||
<MyInput | ||
variant='textarea' | ||
id='message' | ||
name='message' | ||
label='your message' | ||
placeholder='why do you want to contact me?' | ||
/> | ||
<Button type='submit'> | ||
<span className='text-sm font-display'> | ||
send message | ||
</span> | ||
</Button> | ||
</FormBase> | ||
) | ||
} | ||
|
||
export default ContactForm |
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 PropTypes from 'prop-types' | ||
|
||
const ContactIconItem = ({ icon: Icon, text, color, ...rest }) => { | ||
return ( | ||
<div | ||
className={` | ||
flex flex-col | ||
items-center | ||
space-y-4 | ||
text-${color} | ||
p-2 | ||
`} | ||
> | ||
<div className={`rounded-full p-8 bg-${color}`}> | ||
<Icon | ||
className='text-2xl md:text-4xl lg:text-6xl' | ||
color='#fff' | ||
/> | ||
</div> | ||
<span | ||
className=' | ||
font-body | ||
text-md text-gray-500 text-center text-lg max-w-header-prose | ||
' | ||
> | ||
{text} | ||
</span> | ||
</div> | ||
) | ||
} | ||
|
||
ContactIconItem.propTypes = { | ||
icon: PropTypes.func, | ||
text: PropTypes.string, | ||
color: PropTypes.string | ||
} | ||
|
||
export default ContactIconItem |
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,50 @@ | ||
import Button from 'Components/Common/Button' | ||
import CardItem from 'Components/Common/Card' | ||
import PropTypes from 'prop-types' | ||
|
||
const SuperpeerServiceItem = ({ icon: Icon, description, title, url, ...rest }) => { | ||
return ( | ||
<CardItem | ||
className=' | ||
flex-grow flex-col | ||
items-start | ||
p-6 | ||
space-y-4 | ||
' | ||
> | ||
<div className='flex flex-row items-center space-x-2'> | ||
<Icon className='text-4xl' /> | ||
<h3 | ||
className=' | ||
text-2xl | ||
font-display font-semibold | ||
' | ||
> | ||
{title} | ||
</h3> | ||
</div> | ||
<p | ||
className=' | ||
font-body | ||
text-sm text-gray-500 | ||
' | ||
> | ||
{description} | ||
</p> | ||
<Button> | ||
<span className='text-xs font-display'> | ||
book now | ||
</span> | ||
</Button> | ||
</CardItem> | ||
) | ||
} | ||
|
||
SuperpeerServiceItem.propTypes = { | ||
title: PropTypes.string, | ||
url: PropTypes.string, | ||
description: PropTypes.string, | ||
icon: PropTypes.func | ||
} | ||
|
||
export default SuperpeerServiceItem |
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