From 1bb2b17bb6f360f207e4831dfbdf0480e4a00c6a Mon Sep 17 00:00:00 2001 From: kj1352 Date: Wed, 17 Feb 2021 12:30:27 +0530 Subject: [PATCH] Additional questions UI partial commit --- src/pages/signup/AdditionalQuestions.tsx | 54 ++++++++++++++++++++++++ src/pages/signup/Signup.module.scss | 9 ++++ src/pages/signup/Signup.tsx | 19 ++++++--- 3 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 src/pages/signup/AdditionalQuestions.tsx diff --git a/src/pages/signup/AdditionalQuestions.tsx b/src/pages/signup/AdditionalQuestions.tsx new file mode 100644 index 0000000..6c2e731 --- /dev/null +++ b/src/pages/signup/AdditionalQuestions.tsx @@ -0,0 +1,54 @@ +import { IonContent, IonButton, IonPage, IonSlides, IonSlide } from '@ionic/react'; +import { Component } from 'react'; +import styles from './Signup.module.scss'; + +type Props = { }; + +type OwnState = { + index: number, +}; + +const slideOpts = { + initialSlide: 1, + speed: 400 +}; + + +class AdditionalQuestions extends Component { + constructor( + props: Props + ) { + super(props); + this.state = { + index: 0 + }; + } + + render() { + return + +
+

+ { this.state.index } / 05 +

+ Skip >> +
+ + +
+

Select if you represent a company of if you're an individual

+

Select answer below

+
+
+ Company + Individual +
+
+
+
+
+ }; +}; + +export default AdditionalQuestions; \ No newline at end of file diff --git a/src/pages/signup/Signup.module.scss b/src/pages/signup/Signup.module.scss index d93b273..2f4ae2a 100644 --- a/src/pages/signup/Signup.module.scss +++ b/src/pages/signup/Signup.module.scss @@ -158,4 +158,13 @@ opacity: 1; transform: translateY(0vh); } +} + + +.slides { + width: 100%; + + ion-slide { + display: block; + } } \ No newline at end of file diff --git a/src/pages/signup/Signup.tsx b/src/pages/signup/Signup.tsx index b8d7a91..c5c0739 100644 --- a/src/pages/signup/Signup.tsx +++ b/src/pages/signup/Signup.tsx @@ -4,22 +4,27 @@ import { Component } from 'react'; import InputWidget from '../../components/input/InputWidget'; import styles from './Signup.module.scss'; import { Link } from "react-router-dom"; +import AdditionalQuestions from '../signup/AdditionalQuestions'; type Props = { }; -type OwnState = { }; +type OwnState = { + signupStep: 'BASIC' | 'ADDITIONAL'; +}; class SignupPage extends Component { constructor( props: Props ) { super(props); - this.state = {}; + this.state = { + signupStep: 'ADDITIONAL' + }; } render() { return - + { this.state.signupStep === 'BASIC' &&
@@ -57,12 +62,16 @@ class SignupPage extends Component {
- Create + this.setState({ signupStep: 'ADDITIONAL' })}> Create
Already have an account? Login
-
+
} + + + { this.state.signupStep === 'ADDITIONAL' && }
}; };