aboutsummaryrefslogtreecommitdiff
path: root/src/components/onboarding/RegistrationWizard.tsx
blob: 1157455f85586ad178b6c445790a898d4e156bbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react';
import {View, StyleSheet, ViewProps} from 'react-native';

interface RegistrationWizardProps extends ViewProps {
  step: 'one' | 'two' | 'three' | 'four' | 'five';
}

const RegistrationWizard = (props: RegistrationWizardProps) => {
  const stepStyle = styles.step;
  const stepActiveStyle = [styles.step, styles.stepActive];
  return (
    <View {...props}>
      <View style={styles.container}>
        <View style={props.step === 'one' ? stepActiveStyle : stepStyle} />
        <View style={styles.progress} />
        <View style={props.step === 'two' ? stepActiveStyle : stepStyle} />
        <View style={styles.progress} />
        <View style={props.step === 'three' ? stepActiveStyle : stepStyle} />
        <View style={styles.progress} />
        <View style={props.step === 'four' ? stepActiveStyle : stepStyle} />
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
  },
  step: {
    height: 18,
    width: 18,
    borderRadius: 9,
    borderWidth: 2,
    borderColor: '#e1f0ff',
  },
  stepActive: {
    backgroundColor: '#e1f0ff',
  },
  progress: {
    width: '20%',
    height: 2,
    backgroundColor: '#e1f0ff',
  },
});

export default RegistrationWizard;