Refactored DataView
parent
59b315ca23
commit
e6294869c4
|
@ -12,7 +12,7 @@
|
|||
:template="paginatorTemplate"
|
||||
:rowsPerPageOptions="rowsPerPageOptions"
|
||||
:currentPageReportTemplate="currentPageReportTemplate"
|
||||
:class="cx('paginator')"
|
||||
:class="cx('paginator', { position: 'top' })"
|
||||
:alwaysShow="alwaysShowPaginator"
|
||||
@page="onPage($event)"
|
||||
:unstyled="unstyled"
|
||||
|
@ -45,7 +45,7 @@
|
|||
:template="paginatorTemplate"
|
||||
:rowsPerPageOptions="rowsPerPageOptions"
|
||||
:currentPageReportTemplate="currentPageReportTemplate"
|
||||
:class="cx('paginator')"
|
||||
:class="cx('paginator', { position: 'bottom' })"
|
||||
:alwaysShow="alwaysShowPaginator"
|
||||
@page="onPage($event)"
|
||||
:unstyled="unstyled"
|
||||
|
|
|
@ -9,9 +9,9 @@ const classes = {
|
|||
}
|
||||
],
|
||||
header: 'p-dataview-header',
|
||||
paginator: ({ instance }) => (instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : ''),
|
||||
paginator: ({ position }) => 'p-dataview-paginator-' + position,
|
||||
content: 'p-dataview-content',
|
||||
emptyMessage: 'p-dataview-emptymessage',
|
||||
emptyMessage: 'p-dataview-empty-message', // TODO: remove?
|
||||
footer: 'p-dataview-footer'
|
||||
};
|
||||
|
||||
|
|
|
@ -1,42 +1,34 @@
|
|||
export default {
|
||||
css: ({ dt }) => `
|
||||
.p-dataview .p-paginator-top {
|
||||
border-width: 0 0 1px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.p-dataview .p-paginator-bottom {
|
||||
border-width: 0 0 1px 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.p-dataview-header {
|
||||
background: ${dt('dataview.header.background')};
|
||||
color: ${dt('dataview.header.color')};
|
||||
border: 1px solid ${dt('dataview.header.border.color')};
|
||||
border-width: 0 0 1px 0;
|
||||
padding: 0.75rem 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.p-dataview-content {
|
||||
background: ${dt('dataview.content.background')};
|
||||
color: ${dt('dataview.content.color')};
|
||||
border: 0 none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.p-dataview-footer {
|
||||
background: ${dt('dataview.footer.background')};
|
||||
color: ${dt('dataview.footer.color')};
|
||||
border: 1px solid ${dt('dataview.footer.border.color')};
|
||||
border-width: 0 0 1px 0;
|
||||
border-width: 1px 0 0 0;
|
||||
padding: 0.75rem 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.p-dataview-layout-options.p-selectbutton .p-button svg {
|
||||
position: relative;
|
||||
.p-dataview-paginator-top {
|
||||
border: solid ${dt('dataview.header.border.color')};
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
|
||||
.p-dataview-paginator-bottom {
|
||||
border: solid ${dt('dataview.footer.border.color')};
|
||||
border-width: 1px 0 0 0;
|
||||
}
|
||||
`
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue