source: frontend/src/Components/RestaurantDetails/Carousel.js@ e9b4ba9

Last change on this file since e9b4ba9 was e9b4ba9, checked in by darsov2 <62809499+darsov2@…>, 6 months ago

prototype

  • Property mode set to 100644
File size: 974 bytes
Line 
1import React from 'react';
2import { useState } from 'react';
3import Carousel from 'react-bootstrap/Carousel';
4import Menu from './Menu';
5import { Row } from 'react-bootstrap';
6
7function MenuCarousel() {
8 const [index, setIndex] = useState(0);
9
10 const handleSelect = (selectedIndex) => {
11 setIndex(selectedIndex);
12 };
13
14 return (
15 <>
16 <hr className='m-3'></hr>
17 <Row className='d-flex justify-content-center align-items-center'><h2>Мени</h2></Row>
18 <hr className='m-2'></hr>
19 <Carousel activeIndex={index} onSelect={handleSelect}>
20 <Carousel.Item>
21 <Menu></Menu>
22 </Carousel.Item>
23 <Carousel.Item>
24 <Menu></Menu>
25 </Carousel.Item>
26 <Carousel.Item>
27 <Menu></Menu>
28 </Carousel.Item>
29 </Carousel>
30 </>
31 );
32}
33
34export default MenuCarousel;
Note: See TracBrowser for help on using the repository browser.