Advertisement
vandasche

home

Apr 7th, 2020
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import logo from './pic/Icon.png';
  3. import {
  4. Container,
  5. Row,
  6. Col,
  7. Navbar,
  8. Form,
  9. FormControl,
  10. Button,
  11. } from 'react-bootstrap';
  12. import '../node_modules/react-datepicker/dist/react-datepicker';
  13. import { DatePicker } from 'react-datepicker';
  14.  
  15. export default class Home extends Component {
  16. state = {
  17. startDate: new Date(),
  18. };
  19.  
  20. handleChange = (date) => {
  21. this.setState({
  22. startDate: date,
  23. });
  24. };
  25. render() {
  26. return (
  27. <div>
  28. <div className='header'>
  29. <Container>
  30. <Row>
  31. <Col sm={6}>
  32. <Navbar.Brand href='#home'>
  33. <span>
  34. <img src={logo} alt='logo' />
  35. </span>
  36. </Navbar.Brand>
  37. </Col>
  38. <Col sm={4}>
  39. <Form inline>
  40. <FormControl
  41. type='text'
  42. placeholder='Tangerang Selatan'
  43. className='mr-sm-2'
  44. />
  45. <Button variant='outline-success'>Search</Button>
  46. </Form>
  47. </Col>
  48. <Col sm={2}>
  49. <Button variant='light'>Sign In</Button>{' '}
  50. <Button variant='dark'>Sign Up</Button>{' '}
  51. </Col>
  52. </Row>
  53. </Container>
  54. </div>
  55. <div className='filter'>
  56. <h2>Type of Rent</h2>
  57. <Button variant='outline-secondary'>Date</Button>{' '}
  58. <Button variant='outline-secondary'>Month</Button>{' '}
  59. <Button variant='outline-secondary'>Year</Button> <h2>Date</h2>
  60. <DatePicker
  61. selected={this.state.startDate}
  62. onChange={this.handleChange}
  63. />
  64. </div>
  65. </div>
  66. );
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement