@@ -7,6 +7,7 @@ type Props = { | |||||
icon?: string, | icon?: string, | ||||
placeholder?: string, | placeholder?: string, | ||||
type: 'TEXT' | 'PASSWORD' | 'PHONE'; | type: 'TEXT' | 'PASSWORD' | 'PHONE'; | ||||
hideEye?: boolean | |||||
}; | }; | ||||
type OwnState = { | type OwnState = { | ||||
@@ -32,7 +33,7 @@ class InputWidget extends Component<Props, OwnState> { | |||||
{ this.props.type === 'PHONE' && <input type='tel' placeholder={this.props.placeholder} /> } | { this.props.type === 'PHONE' && <input type='tel' placeholder={this.props.placeholder} /> } | ||||
{ this.props.type === 'PASSWORD' && | |||||
{ this.props.type === 'PASSWORD' && !this.props.hideEye && | |||||
<IonButton className={styles.eyeButton} onClick={e => this.setState({ showPassword: !this.state.showPassword })}> | <IonButton className={styles.eyeButton} onClick={e => this.setState({ showPassword: !this.state.showPassword })}> | ||||
{ this.state.showPassword && <IonIcon icon={eyeOffOutline}></IonIcon> } | { this.state.showPassword && <IonIcon icon={eyeOffOutline}></IonIcon> } | ||||
{ !this.state.showPassword && <IonIcon icon={eyeOutline}></IonIcon> } | { !this.state.showPassword && <IonIcon icon={eyeOutline}></IonIcon> } | ||||
@@ -106,7 +106,7 @@ | |||||
font-size: 14px; | font-size: 14px; | ||||
color: var(--rock); | color: var(--rock); | ||||
a { | |||||
a, span { | |||||
color: var(--shamrock); | color: var(--shamrock); | ||||
text-decoration: none; | text-decoration: none; | ||||
} | } | ||||
@@ -3,7 +3,7 @@ import { personOutline, lockOpenOutline } from 'ionicons/icons'; | |||||
import { Component } from 'react'; | import { Component } from 'react'; | ||||
import InputWidget from '../../components/input/InputWidget'; | import InputWidget from '../../components/input/InputWidget'; | ||||
import styles from './Login.module.scss'; | import styles from './Login.module.scss'; | ||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom" | |||||
import { Link } from "react-router-dom"; | |||||
type Props = { }; | type Props = { }; | ||||
@@ -32,7 +32,7 @@ class WelcomePage extends Component<Props, OwnState> { | |||||
</p> | </p> | ||||
<div className={styles.actionButtonsHolder}> | <div className={styles.actionButtonsHolder}> | ||||
<IonButton className={styles.actionButton} expand="block"> Create Account </IonButton> | |||||
<IonButton className={styles.actionButton} expand="block" routerLink="/signup"> Create Account </IonButton> | |||||
<IonButton className={styles.actionButton} fill="outline" expand="block" routerLink="/login"> Login </IonButton> | <IonButton className={styles.actionButton} fill="outline" expand="block" routerLink="/login"> Login </IonButton> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -66,6 +66,29 @@ | |||||
position: relative; | position: relative; | ||||
animation: fadeIn 1s forwards; | animation: fadeIn 1s forwards; | ||||
.confirmationAction { | |||||
padding: 10px; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
overflow: visible; | |||||
label { | |||||
margin: 0; | |||||
font-size: 14px; | |||||
text-align: left; | |||||
color: var(--rock); | |||||
} | |||||
.toggle { | |||||
contain: none; | |||||
--handle-background: var(--apricot); | |||||
--handle-background-checked: var(--shamrock); | |||||
--background: var(--ash-dust); | |||||
--background-checked: var(--ash-dust); | |||||
} | |||||
} | |||||
.separator { | .separator { | ||||
display: block; | display: block; | ||||
width: 100%; | width: 100%; | ||||
@@ -119,7 +142,7 @@ | |||||
font-size: 14px; | font-size: 14px; | ||||
color: var(--rock); | color: var(--rock); | ||||
span { | |||||
span, a { | |||||
color: var(--shamrock); | color: var(--shamrock); | ||||
text-decoration: none; | text-decoration: none; | ||||
} | } | ||||
@@ -1,8 +1,9 @@ | |||||
import { IonContent, IonPage, IonButton } from '@ionic/react'; | |||||
import { IonContent, IonPage, IonButton, IonToggle } from '@ionic/react'; | |||||
import { personOutline, lockOpenOutline, mailOutline, phonePortraitOutline } from 'ionicons/icons'; | import { personOutline, lockOpenOutline, mailOutline, phonePortraitOutline } from 'ionicons/icons'; | ||||
import { Component } from 'react'; | import { Component } from 'react'; | ||||
import InputWidget from '../../components/input/InputWidget'; | import InputWidget from '../../components/input/InputWidget'; | ||||
import styles from './Signup.module.scss'; | import styles from './Signup.module.scss'; | ||||
import { Link } from "react-router-dom"; | |||||
type Props = { }; | type Props = { }; | ||||
@@ -47,15 +48,20 @@ class SignupPage extends Component<Props, OwnState> { | |||||
</div> | </div> | ||||
<div className={styles.input}> | <div className={styles.input}> | ||||
<InputWidget type={'PASSWORD'} icon={lockOpenOutline} placeholder={'Confirm Password'} /> | |||||
<InputWidget type={'PASSWORD'} hideEye={true} icon={lockOpenOutline} placeholder={'Confirm Password'} /> | |||||
</div> | |||||
<div className={styles.confirmationAction}> | |||||
<label> Login with fingerprint scanner </label> | |||||
<IonToggle className={styles.toggle} /> | |||||
</div> | </div> | ||||
<div className={styles.actionButtonsHolder}> | <div className={styles.actionButtonsHolder}> | ||||
<IonButton className={styles.actionButton} expand="block"> Login </IonButton> | |||||
</div> | |||||
<IonButton className={styles.actionButton} expand="block"> Create </IonButton> | |||||
</div> | |||||
</section> | </section> | ||||
<div className={ styles.navigationLink }> Already have an account? <a> Login </a> </div> | |||||
<div className={ styles.navigationLink }> Already have an account? <Link to='/login'> <span> Login </span> </Link> </div> | |||||
</IonContent> | </IonContent> | ||||
</IonPage> | </IonPage> | ||||
}; | }; | ||||