Fakultas Ilmu Komputer UI

Login.jsx 1.27 KB
Newer Older
1
import React from 'react';
2
import { Grid, Segment, Card } from 'semantic-ui-react';
3
import LoginForm from './components/LoginForm';
4
import RegisterModal from './components/RegisterModal';
5
6

export default class Login extends React.Component {
7
8
9
10
11
12
13
14
15
16
17
18
19

  static defaultProps = {
    children: null,
  };

  static propTypes = {
    children: React.PropTypes.oneOfType([
      React.PropTypes.arrayOf(React.PropTypes.node),
      React.PropTypes.node,
    ]),
  };

  render = () => (
20
21

    <div className="halamanLogin">
22
23
24
25
26
      <Grid columns={2} relaxed>
        <Grid.Column>
          <Segment basic>
            <LoginForm type="company" header="Company Login" imgSrc="logo.png" imgSize="small" />
            {this.props.children}
27

28
          </Segment >
29
30
          <div className="register">
            <Card>
31
32
33
34
35
36
37
              <Card.Content>
                <Card.Header>
                  New to us ?
                </Card.Header>
                <RegisterModal />
              </Card.Content>
            </Card>
38
          </div>
39

40
        </Grid.Column>
41

42
43
44
45
46
47
        <Grid.Column>
          <Segment basic>
            <LoginForm type="sso-ui" header="SSO Login" imgSrc="UI.png" imgSize="tiny" />
            {this.props.children}
          </Segment>
        </Grid.Column>
48

49
      </Grid>
50
    </div>
51
  )
52
53
}