Last change
on this file since e9b4ba9 was e9b4ba9, checked in by darsov2 <62809499+darsov2@…>, 7 months ago |
prototype
|
-
Property mode
set to
100644
|
File size:
974 bytes
|
Rev | Line | |
---|
[e9b4ba9] | 1 | import React from 'react';
|
---|
| 2 | import { useState } from 'react';
|
---|
| 3 | import Carousel from 'react-bootstrap/Carousel';
|
---|
| 4 | import Menu from './Menu';
|
---|
| 5 | import { Row } from 'react-bootstrap';
|
---|
| 6 |
|
---|
| 7 | function 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 |
|
---|
| 34 | export default MenuCarousel; |
---|
Note:
See
TracBrowser
for help on using the repository browser.