Advertisement
vandasche

Untitled

Apr 8th, 2020
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.77 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import {
  3. Container,
  4. Row,
  5. Navbar,
  6. FormControl,
  7. Col,
  8. Form,
  9. Button,
  10. Jumbotron,
  11. DropdownButton,
  12. Dropdown,
  13. Modal,
  14. } from 'react-bootstrap';
  15. import Sign from '../compo/sign-modal';
  16. import logo from '../pic/Icon.png';
  17.  
  18. export default class Header extends Component {
  19. state = {
  20. modal: false,
  21. };
  22. signupClose = () => {
  23. this.setState({ modal: false });
  24. };
  25. signupOpen = () => {
  26. this.setState({ modal: true });
  27. };
  28. render() {
  29. return (
  30. <div>
  31. <div>
  32. <Jumbotron>
  33. <Container>
  34. <Row>
  35. <Col>
  36. <span>
  37. <img src={logo} alt='logo' />
  38. </span>
  39. </Col>
  40. <Col>
  41. <Form inline className='search'>
  42. <FormControl
  43. type='text'
  44. placeholder='Tangerang Selatan'
  45. className='mr-sm-2'
  46. />
  47. <Button variant='outline-success'>Search</Button>
  48. </Form>
  49. </Col>
  50. <Col>
  51. <div className='sign'>
  52. <Button
  53. onClick={this.signupOpen}
  54. variant='light'
  55. style={{ marginRight: '20px' }}
  56. >
  57. Sign In
  58. </Button>
  59. <SingUp />{' '}
  60. <Sign
  61. visible={this.state.modal}
  62. onClose={this.signupClose}
  63. />
  64. <Button variant='dark'>Sign Up</Button>{' '}
  65. </div>
  66. </Col>
  67. </Row>
  68. </Container>
  69. </Jumbotron>
  70. </div>
  71. </div>
  72. );
  73. }
  74. }
  75.  
  76. class SingUp extends Component {
  77. constructor(props) {
  78. super(props);
  79. }
  80.  
  81. render() {
  82. return (
  83. <div>
  84. {/* <Button color='primary' onClick={this.handleOpenModal}>
  85. Launch
  86. </Button> */}
  87. <Modal
  88. // show={this.props}
  89. onHide={this.props.onClose}
  90. size='lg'
  91. aria-labelledby='contained-modal-title-vcenter'
  92. centered
  93. >
  94. <Modal.Header closeButton></Modal.Header>
  95. <Modal.Body>
  96. <Form>
  97. <h1 style={{ textAlign: 'center' }}>SIGN IN</h1>
  98. <Form.Group controlId='formBasicName'>
  99. <Form.Label>Fullname</Form.Label>
  100. <Form.Control type='email' placeholder='Enter Fullname' />
  101. </Form.Group>
  102. <Form.Group controlId='formBasicUname'>
  103. <Form.Label>Username</Form.Label>
  104. <Form.Control type='text' placeholder='Enter Username' />
  105. </Form.Group>
  106. <Form.Group controlId='formBasicEmail'>
  107. <Form.Label>Email</Form.Label>
  108. <Form.Control type='email' placeholder='Enter Email' />
  109. </Form.Group>
  110. <Form.Group controlId='formBasicPassword'>
  111. <Form.Label>Password</Form.Label>
  112. <Form.Control type='password' placeholder='Enter Password' />
  113. </Form.Group>
  114. <Form.Group>
  115. <Form.Label>List as</Form.Label>
  116. <DropdownButton
  117. id='dropdown-basic-button'
  118. title='Select your status'
  119. >
  120. <Dropdown.Item href='#/action-1'>User</Dropdown.Item>
  121. <Dropdown.Item href='#/action-2'>Owner</Dropdown.Item>
  122. </DropdownButton>
  123. </Form.Group>{' '}
  124. <Form.Group>
  125. <Form.Label>Gender</Form.Label>
  126. <DropdownButton
  127. id='dropdown-basic-button'
  128. title='Select your gender'
  129. >
  130. <Dropdown.Item href='#/action-1'>Male</Dropdown.Item>
  131. <Dropdown.Item href='#/action-2'>Female</Dropdown.Item>
  132. </DropdownButton>
  133. </Form.Group>
  134. <Form.Group controlId='exampleForm.ControlTextarea1'>
  135. <Form.Label>Address</Form.Label>
  136. <Form.Control as='textarea' rows='3' />
  137. </Form.Group>
  138. <div style={{ display: 'flex', justifyContent: 'center' }}>
  139. <Button
  140. variant='primary'
  141. style={{ display: 'flex', justifyContent: 'center' }}
  142. onClick={this.handleCloseModal}
  143. >
  144. SIGN IN
  145. </Button>
  146. </div>
  147. </Form>
  148. </Modal.Body>
  149. </Modal>
  150. </div>
  151. );
  152. }
  153. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement