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-panel {
|
|
|
|
border: 1px solid ${dt('panel.border.color')};
|
2024-05-11 14:05:42 +00:00
|
|
|
border-radius: ${dt('panel.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
background: ${dt('panel.background')};
|
|
|
|
color: ${dt('panel.color')};
|
2024-05-11 14:05:42 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: ${dt('panel.gap')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-panel-header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
2024-05-11 14:05:42 +00:00
|
|
|
padding: ${dt('panel.header.padding')};
|
|
|
|
background: ${dt('panel.header.background')};
|
|
|
|
color: ${dt('panel.header.color')};
|
|
|
|
border-style: solid;
|
|
|
|
border-width: ${dt('panel.header.border.width')};
|
|
|
|
border-color: ${dt('panel.header.border.color')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-panel-toggleable .p-panel-header {
|
2024-05-11 14:05:42 +00:00
|
|
|
padding: ${dt('panel.toggleable.header.padding')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-panel-title {
|
|
|
|
line-height: 1;
|
2024-05-11 14:05:42 +00:00
|
|
|
font-weight: ${dt('panel.title.font.weight')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-panel-content {
|
2024-05-11 14:05:42 +00:00
|
|
|
padding: ${dt('panel.content.padding')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-panel-footer {
|
2024-05-11 14:05:42 +00:00
|
|
|
padding: ${dt('panel.footer.padding')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-panel-header + .p-panel-content-container > .p-panel-content {
|
|
|
|
padding-top: 0;
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: ({ props }) => [
|
|
|
|
'p-panel p-component',
|
|
|
|
{
|
|
|
|
'p-panel-toggleable': props.toggleable
|
|
|
|
}
|
|
|
|
],
|
|
|
|
header: 'p-panel-header',
|
|
|
|
title: 'p-panel-title',
|
2024-04-30 14:09:06 +00:00
|
|
|
headerActions: 'p-panel-header-actions',
|
2024-05-06 15:23:01 +00:00
|
|
|
pcToggleButton: 'p-panel-toggle-button',
|
2024-04-30 14:09:06 +00:00
|
|
|
contentContainer: 'p-panel-content-container',
|
2023-10-02 10:46:09 +00:00
|
|
|
content: 'p-panel-content',
|
|
|
|
footer: 'p-panel-footer'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'panel',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-02 10:46:09 +00:00
|
|
|
classes
|
|
|
|
});
|