Step1.tsx 3.28 KB
Newer Older
Sam Gluck's avatar
Sam Gluck committed
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import * as React from 'react';
import { TextField, Label } from '@zendeskgarden/react-textfields';
import { Col, Row } from '@zendeskgarden/react-grid';

import H6 from '../../components/typography/H6/H6';
import P from '../../components/typography/P/P';
import TextInput from '../../components/inputs/Text/Text';
import Button from '../../components/elements/Button/Button';
import LanguageSelect from '../../components/inputs/LanguageSelect/LanguageSelect';
import styled from '../../themes/styled';

const Spacer = styled.div`
  height: 10px;
  width: 100%;
`;

export default ({ user, goToNextStep, randomizeEmojiId, linkUserState }) => {
  return (
    <>
      <Row>
        <Col>
          <H6 style={{ borderBottom: '1px solid lightgrey' }}>
            <span style={{ color: 'darkgrey', fontSize: '.6em' }}>1.</span>{' '}
            Personal details
          </H6>
          <P>
            What your profile will look like is on the right. Start entering the
            details below to build it.
          </P>
          <TextField>
            <Label>Username</Label>
            <TextInput
              value={user.username}
              onChange={linkUserState('username')}
              placeholder="e.g. joebloggs84"
              maxLength={20}
            />
          </TextField>
          <Spacer />
          <TextField>
            <Label>Password</Label>
            <TextInput
              value={user.password}
              onChange={linkUserState('password')}
              placeholder="Enter a password"
              type="password"
            />
          </TextField>
          <Spacer />
          <TextField>
            <Label>Emoji ID</Label>
            <TextInput
              disabled
              style={{ backgroundColor: 'white' }}
              value={user.emojiId}
              button={<Button onClick={randomizeEmojiId}>Shuffle</Button>}
            />
          </TextField>
          <Spacer />
          <TextField>
            <Label>Email address</Label>
            <TextInput
              value={user.email}
              onChange={linkUserState('email')}
              placeholder="e.g. joebloggs@example.com"
              maxLength={100}
            />
          </TextField>
          <Spacer />
          <TextField>
            <Label>Language</Label>
            <LanguageSelect fullWidth={true} />
          </TextField>
          <Spacer />
          <TextField>
            <Label>Location</Label>
            <TextInput
              value={user.location}
              onChange={linkUserState('location')}
              placeholder="e.g. United Kingdom"
              maxLength={50}
            />
          </TextField>
          <Spacer />
          <TextField>
            <Label>Role</Label>
            <TextInput
              value={user.role}
              onChange={linkUserState('role')}
              placeholder="e.g. Head Teacher"
              maxLength={50}
            />
          </TextField>
        </Col>
      </Row>
      <Row style={{ flexGrow: 1 }} />
      <Row>
        <Col style={{ display: 'flex', alignItems: 'center', color: 'grey' }}>
          Next: your interests
        </Col>
        <Col style={{ display: 'flex', justifyContent: 'flex-end' }}>
          <Button onClick={goToNextStep}>Continue</Button>
        </Col>
      </Row>
    </>
  );
};