primevue-mirror/components/lib/paginator/style/PaginatorStyle.js

58 lines
1.6 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const classes = {
paginator: ({ instance, key }) => [
'p-paginator p-component',
{
'p-paginator-default': !instance.hasBreakpoints(),
[`p-paginator-${key}`]: instance.hasBreakpoints()
}
],
2024-04-26 08:07:08 +00:00
start: 'p-paginator-content-start',
end: 'p-paginator-content-end',
firstPageButton: ({ instance }) => [
2024-04-26 08:07:08 +00:00
'p-paginator-first',
{
'p-disabled': instance.$attrs.disabled
}
],
2024-04-26 08:07:08 +00:00
firstPageIcon: 'p-paginator-first-icon',
previousPageButton: ({ instance }) => [
2024-04-26 08:07:08 +00:00
'p-paginator-prev',
{
'p-disabled': instance.$attrs.disabled
}
],
2024-04-26 08:07:08 +00:00
previousPageIcon: 'p-paginator-prev-icon',
nextPageButton: ({ instance }) => [
2024-04-26 08:07:08 +00:00
'p-paginator-next',
{
'p-disabled': instance.$attrs.disabled
}
],
2024-04-26 08:07:08 +00:00
nextPageIcon: 'p-paginator-next-icon',
lastPageButton: ({ instance }) => [
2024-04-26 08:07:08 +00:00
'p-paginator-last',
{
'p-disabled': instance.$attrs.disabled
}
],
2024-04-26 08:07:08 +00:00
lastPageIcon: 'p-paginator-last-icon',
pages: 'p-paginator-pages',
pageButton: ({ props, pageLink }) => [
2024-04-26 08:07:08 +00:00
'p-paginator-page',
{
2024-04-26 08:07:08 +00:00
'p-paginator-page-active': pageLink - 1 === props.page
}
],
current: 'p-paginator-current',
2024-04-26 08:07:08 +00:00
rowPerPageDropdown: 'p-paginator-rpp-dropdown',
jumpToPageDropdown: 'p-paginator-jtp-dropdown',
jumpToPageInput: 'p-paginator-jtp-input'
};
export default BaseStyle.extend({
name: 'paginator',
classes
});