source: frontend/src/Components/Tab/Tab.js@ 0f5aa27

Last change on this file since 0f5aa27 was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 10 months ago

images upload/download impl, other fixes

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[e6c2521]1import React, { useState } from "react";
2import { Container, Nav } from "react-bootstrap";
3import { Tab } from "react-bootstrap";
4import TabFormHotel from "./TabFormHotel";
5import TabFormRestaurant from "./TabFormRestaurant";
6import TabFormTransport from "./TabFormTransport";
7import { FaHotel, FaTaxi } from 'react-icons/fa'
8import { MdRestaurant } from "react-icons/md"
9
10function 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
67export default TabComponent;
Note: See TracBrowser for help on using the repository browser.