From 5e8da70eae3aab86f194a28ee2ecca3368918db2 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Sun, 6 Jan 2019 20:45:46 -0800 Subject: feat(website): implement market maker form --- .../website/ts/components/modals/modal_contact.tsx | 239 +++++++++++++++------ packages/website/ts/pages/market_maker.tsx | 8 +- 2 files changed, 184 insertions(+), 63 deletions(-) diff --git a/packages/website/ts/components/modals/modal_contact.tsx b/packages/website/ts/components/modals/modal_contact.tsx index d9c276584..a3a1f13f5 100644 --- a/packages/website/ts/components/modals/modal_contact.tsx +++ b/packages/website/ts/components/modals/modal_contact.tsx @@ -13,10 +13,16 @@ import { Input, InputWidth } from 'ts/components/modals/input'; import { Heading, Paragraph } from 'ts/components/text'; import { GlobalStyle } from 'ts/constants/globalStyle'; +export enum ModalContactType { + General = 'GENERAL', + MarketMaker = 'MARKET_MAKER', +} + interface Props { theme?: GlobalStyle; isOpen?: boolean; onDismiss?: () => void; + modalContactType: ModalContactType; } interface FormProps { @@ -39,23 +45,30 @@ interface ErrorProps { } export class ModalContact extends React.Component { + public static defaultProps = { + modalContactType: ModalContactType.General, + }; public state = { isSubmitting: false, isSuccessful: false, errors: {}, }; + // shared fields public nameRef: React.RefObject = React.createRef(); public emailRef: React.RefObject = React.createRef(); public companyProjectRef: React.RefObject = React.createRef(); - public linkRef: React.RefObject = React.createRef(); public commentsRef: React.RefObject = React.createRef(); + // general lead fields + public linkRef: React.RefObject = React.createRef(); + // market maker lead fields + public countryRef: React.RefObject = React.createRef(); + public fundSizeRef: React.RefObject = React.createRef(); public constructor(props: Props) { super(props); } public render(): React.ReactNode { const { isOpen, onDismiss } = this.props; const { isSuccessful, errors } = this.state; - return ( <> { Contact the 0x Core Team - - If you're considering building on 0x, we're happy to answer your questions. Fill out the - form so we can connect you with the right person to help you get started. - - - - - - - - - - - - - - + {this._renderFormContent(errors)}