我想要自定义 mui 分页栏。 我想自定义第一页、最后一页按钮 <、> 以及“上一页”、“下一页”字样。
最佳答案
您可以像这样覆盖这些组件。他们的文档中有一个部分 here和 PaginationItem 的 API here .
<Pagination
count={10}
renderItem={(item) => (
<PaginationItem
components={{
last: (props) => <button {...props}>Last</button>,
next: (props) => <button {...props}>Next</button>,
first: (props) => <button {...props}>First</button>,
previous: (props) => <button {...props}>Previous</button>
}}
{...item}
/>
)}
showFirstButton
showLastButton
/>
关于reactjs - 如何自定义 mui 分页栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72412904/