From e57d57fdb6635d35ef785f34a60105c29ebc420f Mon Sep 17 00:00:00 2001 From: mlfaa Date: Wed, 15 Dec 2021 15:49:21 -0300 Subject: [PATCH] #237 - Creating carousel cards component --- src/components/CarouselCards/index.js | 69 +++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/components/CarouselCards/index.js diff --git a/src/components/CarouselCards/index.js b/src/components/CarouselCards/index.js new file mode 100644 index 00000000..e397cdc8 --- /dev/null +++ b/src/components/CarouselCards/index.js @@ -0,0 +1,69 @@ +/* eslint-disable react/prop-types */ +import React from 'react'; +import { isTablet } from 'react-device-detect'; +import PropTypes from 'prop-types'; +import Carousel from 'react-multi-carousel'; +import 'react-multi-carousel/lib/styles.css'; +import { + Box, +} from '@material-ui/core'; + +import TotalFrame from '../Frames/TotalFrame'; + +export default function CaroulselCards(props) { + const { carouselItens } = props; + const responsive = { + largedesktop: { + breakpoint: { max: 3840, min: 2160 }, + items: 1, + }, + desktop: { + breakpoint: { max: 3000, min: 1024 }, + items: 1, + }, + tablet: { + breakpoint: { max: 1024, min: 600 }, + items: 2.5, + }, + mobile: { + breakpoint: { max: 600, min: 0 }, + items: 1.5, + }, + }; + + return ( + + {carouselItens.map((item) => ( + + + + ))} + + ); +} + +CaroulselCards.propTypes = { + carouselItens: PropTypes.array, +}; + +CaroulselCards.defaultProps = { + carouselItens: [], +};