react.js antd carousel with arrows

后端 未结 7 2234
既然无缘
既然无缘 2021-01-12 11:26

I am looking at using the antd Caroseul, but I\'ve not seen an example that creates a prev/next or pause button.

const { Carousel } = antd;

ReactDOM.render         


        
7条回答
  •  日久生厌
    2021-01-12 11:56

    I'm using the React Hooks. I just found the result. Here is example:

    function SampleNextArrow(props) {
        const { className, style, onClick } = props
        return (
            
    ) } function SamplePrevArrow(props) { const { className, style, onClick } = props return (
    ) } const settings = { dots: true, infinite: true, speed: 500, slidesToShow: 8, nextArrow: , prevArrow: , } {koompiApps.map((res, index) => { return (
    { setAppsKey(`${index + 1}`) }} >
    {res.name}

    {res.name}

    ) })}

    The Result:

提交回复
热议问题