dimanche 21 mars 2021

React show component if web screen size

I have a Container with a Carousel that I do not want to be displayed if the screen size is mobile or tablet.

<Container className="jumbotronBg rounded-pill shadow">
        <Carousel className="d-block font-italic font-weight-light text-center text-white w-100 carousels" interval={5000} controls={false} indicators={false} fade>                                   
            <Carousel.Item>  
                <p className="blockquote mx-auto py-5 w-75">
                    "Some text.."
                    <br />
                    <cite title="Source Title">- Christian Moueix</cite>
                </p>
            </Carousel.Item>
            <Carousel.Item>              
                <p className="blockquote mx-auto py-5 w-75">
                    "Some text.."
                    <br />
                    <cite title="Source Title">- Alexandre Dumas</cite>
                </p>
            </Carousel.Item>         
        </Carousel>      
        </Container>

If there is someone that could help me with a ternary if, I would much appreciate it.

Aucun commentaire:

Enregistrer un commentaire