2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
const theme = ({ dt }) => `
|
|
|
|
.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;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dataview-content {
|
|
|
|
background: ${dt('dataview.content.background')};
|
|
|
|
color: ${dt('dataview.content.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-dataview-footer {
|
|
|
|
background: ${dt('dataview.footer.background')};
|
|
|
|
color: ${dt('dataview.footer.color')};
|
|
|
|
border: 1px solid ${dt('dataview.footer.border.color')};
|
|
|
|
border-width: 1px 0 0 0;
|
|
|
|
padding: 0.75rem 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: ({ props }) => [
|
|
|
|
'p-dataview p-component',
|
|
|
|
{
|
|
|
|
'p-dataview-list': props.layout === 'list',
|
|
|
|
'p-dataview-grid': props.layout === 'grid'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
header: 'p-dataview-header',
|
2024-04-25 21:39:48 +00:00
|
|
|
paginator: ({ position }) => 'p-dataview-paginator-' + position,
|
2023-10-02 10:46:09 +00:00
|
|
|
content: 'p-dataview-content',
|
2024-04-25 21:39:48 +00:00
|
|
|
emptyMessage: 'p-dataview-empty-message', // TODO: remove?
|
2023-10-02 10:46:09 +00:00
|
|
|
footer: 'p-dataview-footer'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'dataview',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-04 09:20:15 +00:00
|
|
|
classes
|
2023-10-02 10:46:09 +00:00
|
|
|
});
|