1 | import React, { useState } from "react";
|
---|
2 | import { Container, Nav } from "react-bootstrap";
|
---|
3 | import { Tab } from "react-bootstrap";
|
---|
4 | import TabFormHotel from "./TabFormHotel";
|
---|
5 | import TabFormRestaurant from "./TabFormRestaurant";
|
---|
6 | import TabFormTransport from "./TabFormTransport";
|
---|
7 | import { FaHotel, FaTaxi } from 'react-icons/fa'
|
---|
8 | import { MdRestaurant } from "react-icons/md"
|
---|
9 |
|
---|
10 | function TabComponent() {
|
---|
11 | const [activeTab, setActiveTab] = useState("/hotel");
|
---|
12 |
|
---|
13 | const handleSelect = (eventKey) => {
|
---|
14 | setActiveTab(eventKey);
|
---|
15 | };
|
---|
16 |
|
---|
17 |
|
---|
18 | return (
|
---|
19 | <Container className='rounded-5'>
|
---|
20 | <Tab.Container
|
---|
21 | activeKey={activeTab}
|
---|
22 | onSelect={handleSelect}
|
---|
23 | className="bg-dark rounded-5"
|
---|
24 | >
|
---|
25 | <Nav
|
---|
26 | fill
|
---|
27 | variant="tabs"
|
---|
28 | className="bg-body rounded-top-5"
|
---|
29 | activeKey="/hotel"
|
---|
30 | id="tab_item"
|
---|
31 | >
|
---|
32 | <Nav.Item className="tab_item rounded-5">
|
---|
33 | <Nav.Link href="/hotel" className="text-left rounded-5">
|
---|
34 | <span className="ikona"><FaHotel color="#159895" style={{lineHeight: "100em"}} size={"1.5em"} className="mx-3"/></span>
|
---|
35 | <span className="ikona">Сместување</span>
|
---|
36 | </Nav.Link>
|
---|
37 | </Nav.Item>
|
---|
38 | <Nav.Item className="tab_item">
|
---|
39 | <Nav.Link eventKey="/restaurant">
|
---|
40 | <span className="ikona"><MdRestaurant color="#159895" size={"1.5em"} className="mx-3"/></span><
|
---|
41 | span className="ikona">Ресторан</span>
|
---|
42 | </Nav.Link>
|
---|
43 | </Nav.Item>
|
---|
44 | <Nav.Item className="tab_item rounded-5">
|
---|
45 | <Nav.Link eventKey="/transport" className="text-left rounded-5"><span className="ikona"><FaTaxi color="#159895" size={"1.5em"} className="mx-3"/></span>
|
---|
46 | <span className="ikona">Превоз</span>
|
---|
47 | </Nav.Link>
|
---|
48 | </Nav.Item>
|
---|
49 | </Nav>
|
---|
50 |
|
---|
51 | <Tab.Content className="py-5 px-3 border rounded-bottom-5 bg-light">
|
---|
52 | <Tab.Pane eventKey="/hotel">
|
---|
53 | <TabFormHotel/>
|
---|
54 | </Tab.Pane>
|
---|
55 | <Tab.Pane eventKey="/restaurant">
|
---|
56 | <TabFormRestaurant/>
|
---|
57 | </Tab.Pane>
|
---|
58 | <Tab.Pane eventKey="/transport">
|
---|
59 | <TabFormTransport/>
|
---|
60 | </Tab.Pane>
|
---|
61 | </Tab.Content>
|
---|
62 | </Tab.Container>
|
---|
63 | </Container>
|
---|
64 | );
|
---|
65 | }
|
---|
66 |
|
---|
67 | export default TabComponent;
|
---|