Skip to content

Commit

Permalink
carousel size adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejaco committed Apr 4, 2024
1 parent 1ef301e commit 9048055
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion devcon/src/components/common/carousel/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import InfiniteScroll from 'lib/components/infinite-scroll/infinite-scroll'
type CarouselProps = {
title?: string
noAnimation?: boolean
marqueeClassName?: string
speed?: number
images: {
src: any
Expand All @@ -27,7 +28,11 @@ export function Carousel(props: CarouselProps) {
</div>

<div className={imagesClassName}>
<InfiniteScroll nDuplications={2} speed={`${props.speed || 300}s`} marqueeClassName="h-[19rem]">
<InfiniteScroll
nDuplications={2}
speed={`${props.speed || 300}s`}
marqueeClassName={props.marqueeClassName || `h-[38rem]`}
>
{props.images.map((image, index) => {
return <Image key={index + 'first'} src={image.src} alt={image.alt} />
})}
Expand Down
3 changes: 2 additions & 1 deletion devcon/src/pages/road-to-devcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,10 @@ const EventsTable = React.memo(({ events, pages }: any) => {

const Gallery = React.memo(() => {
return (
<div id="communities" className="expand py-8 pb-16">
<div id="communities" className="expand py-8">
<Carousel
speed={150}
marqueeClassName="h-[19rem]"
images={[
{
alt: 'Community 1',
Expand Down

0 comments on commit 9048055

Please sign in to comment.