How to remove next and Previous buttons from pagination of flowbite library?
I write this code but the buttons doesn’t remove.
My goal is to reach this figure:
import { Pagination } from "flowbite-react";
<Pagination
className="mx-auto"
currentPage={1}
totalPages={3}
showPrevious={false}
showNext={false}
/>
2
Answers
I did it in a simpler way
Looking at the source code for
Pagination
, there does not seem to be any API surface to prevent rendering of the Previous and Next elements.However, you could work-around this by hiding the
<li>
elements that house these links, like:Or by using one of the other options for setting classnames, like:
Or