/** * * PopUpForm * */ import React from 'react'; import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; import { router } from 'app'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import Input from 'components/Input'; import styles from './styles.scss'; class PopUpForm extends React.Component { // eslint-disable-line react/prefer-stateless-function toggleModal = () => router.push(router.location.pathname); renderButton = () => { if (this.props.showLoader) { return ( ); } return ( ); } renderForm = () => { if (this.props.settingType === 'providers') { return (
console.log('change')} selectOptions={[{ value: 'Email'}, { value: 'Facebook' }, { value: 'Google' }]} type="select" validations={{ required: true }} value="email" />
console.log('change')} value={true} type="toggle" validations={{}} />
); } return (
console.log('change')} value="" placeholder="John Doe" type="text" validations={{}} /> console.log('change')} value="" placeholder="John Doe" type="email" validations={{}} /> console.log('change')} value="" placeholder="John Doe" type="email" validations={{}} />
console.log('change')} value="" placeholder="Please confirm your address email for %APP_NAME%" type="text" validations={{}} /> console.log('change')} value="" placeholder="John Doe" type="textarea" validations={{}} />
); } render() { return (
{this.props.actionType ? ( ) :
}
{this.renderForm()}
{this.renderButton()}
); } } PopUpForm.proptypes = { actionType: PropTypes.string.isRequired, isOpen: PropTypes.bool.isRequired, settingType: PropTypes.string.isRequired, }; export default PopUpForm;