chore: use proper name convention for build tools

This commit is contained in:
Rafael 2024-11-30 10:17:41 +00:00
parent 62f39f3561
commit d646aee24b
283 changed files with 353 additions and 422 deletions

View file

@ -0,0 +1,64 @@
import { makeStyles } from '@material-ui/core/styles'
import React, { memo } from 'react'
import ReactCarousel from 'react-material-ui-carousel'
import LeftArrow from 'src/styling/icons/arrow/carousel-left-arrow.svg?react'
import RightArrow from 'src/styling/icons/arrow/carousel-right-arrow.svg?react'
import { URI } from 'src/utils/apollo'
const useStyles = makeStyles({
imgWrapper: {
alignItems: 'center',
justifyContent: 'center',
display: 'flex'
},
imgInner: {
objectFit: 'contain',
objectPosition: 'center',
width: 500,
height: 400,
marginBottom: 40
}
})
export const Carousel = memo(({ photosData, slidePhoto }) => {
const classes = useStyles()
return (
<>
<ReactCarousel
PrevIcon={<LeftArrow />}
NextIcon={<RightArrow />}
navButtonsProps={{
style: {
backgroundColor: 'transparent',
borderRadius: 0,
color: 'transparent',
opacity: 1
}
}}
navButtonsWrapperProps={{
style: {
marginLeft: -22,
marginRight: -22
}
}}
autoPlay={false}
indicators={false}
navButtonsAlwaysVisible={true}
next={activeIndex => slidePhoto(activeIndex)}
prev={activeIndex => slidePhoto(activeIndex)}>
{photosData.map((item, i) => (
<div>
<div className={classes.imgWrapper}>
<img
className={classes.imgInner}
src={`${URI}/${item?.photoDir}/${item?.path}`}
alt=""
/>
</div>
</div>
))}
</ReactCarousel>
</>
)
})