diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 05:37:01 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-15 05:37:01 +0800 |
commit | a1410409fff5a015c5afbe3eabc1cbc8e70d1735 (patch) | |
tree | b7661133548e1d1bf88f7ec960536f516bd3ef5d /packages/website/ts/@next/pages/why.tsx | |
parent | 32eab3acff7d2cb334db9396a6182df9ba672390 (diff) | |
download | dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.tar dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.tar.gz dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.tar.bz2 dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.tar.lz dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.tar.xz dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.tar.zst dexon-0x-contracts-a1410409fff5a015c5afbe3eabc1cbc8e70d1735.zip |
Add contact modal to pages with contact link
Diffstat (limited to 'packages/website/ts/@next/pages/why.tsx')
-rw-r--r-- | packages/website/ts/@next/pages/why.tsx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/packages/website/ts/@next/pages/why.tsx b/packages/website/ts/@next/pages/why.tsx index ba83ceb46..a267bd09e 100644 --- a/packages/website/ts/@next/pages/why.tsx +++ b/packages/website/ts/@next/pages/why.tsx @@ -7,12 +7,13 @@ import {Hero} from 'ts/@next/components/hero'; import { Banner } from 'ts/@next/components/banner'; import { Button } from 'ts/@next/components/button'; +import {Definition} from 'ts/@next/components/definition'; +import {Column, Section, WrapSticky} from 'ts/@next/components/newLayout'; import { SiteWrap } from 'ts/@next/components/siteWrap'; import { Slide, Slider } from 'ts/@next/components/slider/slider'; -import { Heading } from 'ts/@next/components/text'; -import {Definition} from 'ts/@next/components/definition'; -import {Column, Section, WrapSticky} from 'ts/@next/components/newLayout'; +import { ModalContact } from '../components/modals/modal_contact'; +import { Heading } from 'ts/@next/components/text'; const offersData = [ { @@ -78,7 +79,10 @@ const useCaseSlides = [ }, ]; -export class NextWhy extends React.PureComponent { +export class NextWhy extends React.Component { + public state = { + isContactModalOpen: false, + }; public render(): React.ReactNode { return ( <SiteWrap theme="dark"> @@ -191,11 +195,20 @@ export class NextWhy extends React.PureComponent { heading="Ready to get started?" subline="Dive into our docs, or contact us if needed" mainCta={{ text: 'Get Started', href: '/docs' }} - secondaryCta={{ text: 'Get in Touch', href: '/contact' }} + secondaryCta={{ text: 'Get in Touch', onClick: this._onOpenContactModal.bind(this) }} /> + <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} /> </SiteWrap> ); } + + public _onOpenContactModal = (): void => { + this.setState({ isContactModalOpen: true }); + } + + public _onDismissContactModal = (): void => { + this.setState({ isContactModalOpen: false }); + } } interface SectionProps { |