Floppy/dataslate

View on GitHub
src/components/KillTeam2021/CarouselWrapper.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react'
import { Carousel } from 'react-bootstrap'

interface Props {
  children: React.ReactNode
  carouselMode: boolean
}

export function CarouselWrapper (props: Props): JSX.Element {
  if (props.carouselMode) {
    return <Carousel interval={null} touch controls indicators={false}>{props.children}</Carousel>
  } else {
    return <>{props.children}</>
  }
}