-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated CTA form to use Jotform as per website (#607)
* Updated CTA form to use Jotform as per website Relates to SSWConsulting/SSW.Rules#1262 * fixed linting * fixing merge conflicts
- Loading branch information
1 parent
3f39f31
commit 538bf16
Showing
8 changed files
with
1,992 additions
and
3,828 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 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,24 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Jotform from 'react-jotform'; | ||
import Popup from '../popup/popup'; | ||
|
||
const JobFormEmbed = ({ jotFormId, open, onClose }) => { | ||
if (!jotFormId) return <></>; | ||
|
||
return ( | ||
<> | ||
<Popup isVisible={open} showCloseIcon={true} onClose={onClose}> | ||
<Jotform src={`https://form.jotform.com/${jotFormId}`}></Jotform> | ||
</Popup> | ||
</> | ||
); | ||
}; | ||
|
||
export default JobFormEmbed; | ||
|
||
JobFormEmbed.propTypes = { | ||
jotFormId: PropTypes.string, | ||
open: PropTypes.bool, | ||
onClose: PropTypes.func, | ||
}; |
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,43 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import Modal from 'react-responsive-modal'; | ||
import PropTypes from 'prop-types'; | ||
import * as styles from './popup.module.css'; | ||
|
||
const Popup = ({ isVisible, onClose, showCloseIcon, className, children }) => { | ||
return ( | ||
<div> | ||
<Modal | ||
open={isVisible} | ||
onClose={onClose} | ||
showCloseIcon={!!showCloseIcon} | ||
classNames={{ | ||
closeButton: styles.closeButton, | ||
modalAnimationIn: styles.formEnterModalAnimation, | ||
modalAnimationOut: styles.formLeaveModalAnimation, | ||
overlay: 'bg-black/50', | ||
modal: classNames([ | ||
'sm:max-w-3xl sm:m-5 sm:p-5', | ||
'w-full mx-0', | ||
'shadow-none bg-black/0', | ||
className, | ||
]), | ||
}} | ||
animationDuration={700} | ||
center | ||
> | ||
{children} | ||
</Modal> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Popup; | ||
|
||
Popup.propTypes = { | ||
isVisible: PropTypes.bool, | ||
showCloseIcon: PropTypes.bool, | ||
onClose: PropTypes.func, | ||
className: PropTypes.string, | ||
children: PropTypes.node, | ||
}; |
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 @@ | ||
@keyframes formEnterOverlayAnimation { | ||
0% { | ||
top: 0px; | ||
margin-top: -100%; | ||
transform: scale(0); | ||
} | ||
|
||
100% { | ||
transform: scale(1); | ||
margin-top: -100%; | ||
} | ||
} | ||
|
||
@keyframes formLeaveOverlayAnimation { | ||
0% { | ||
transform: scale(1); | ||
} | ||
|
||
100% { | ||
transform: scale(0); | ||
} | ||
} | ||
|
||
@keyframes formEnterModalAnimation { | ||
0% { | ||
top: 0px; | ||
margin-top: -100%; | ||
transform: scale(1); | ||
} | ||
|
||
100% { | ||
transform: scale(1); | ||
} | ||
} | ||
|
||
@keyframes formLeaveModalAnimation { | ||
0% { | ||
transform: scale(1); | ||
} | ||
|
||
100% { | ||
transform: scale(1); | ||
margin-top: -100%; | ||
} | ||
} | ||
|
||
.closeButton { | ||
background-color: #fff; | ||
border-radius: 15px; | ||
} |
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
Oops, something went wrong.