primevue-mirror/components/lib/inlinemessage/style/InlineMessageStyle.js

111 lines
3.2 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const theme = ({ dt }) => `
.p-inline-message {
display: inline-flex;
align-items: center;
justify-content: center;
2024-05-09 15:35:57 +00:00
padding: ${dt('inlinemessage.padding')};
border-radius: ${dt('inlinemessage.border.radius')};
gap: ${dt('inlinemessage.gap')};
}
.p-inline-message-text {
2024-05-09 15:35:57 +00:00
font-weight: ${dt('inlinemessage.text.font.weight')};
}
.p-inline-message-icon {
flex-shrink: 0;
2024-05-09 15:35:57 +00:00
font-size: ${dt('inlinemessage.icon.size')};
width: ${dt('inlinemessage.icon.size')};
height: ${dt('inlinemessage.icon.size')};
}
.p-inline-message-icon-only .p-inline-message-text {
visibility: hidden;
width: 0;
}
.p-fluid .p-inline-message {
display: flex;
}
.p-inline-message-info {
background: ${dt('inlinemessage.info.background')};
border: 1px solid ${dt('inlinemessage.info.border.color')};
color: ${dt('inlinemessage.info.color')};
2024-05-06 21:23:42 +00:00
box-shadow: ${dt('inlinemessage.info.shadow')};
}
.p-inline-message-info .p-inline-message-icon {
color: ${dt('inlinemessage.info.color')};
}
.p-inline-message-success {
background: ${dt('inlinemessage.success.background')};
border: 1px solid ${dt('inlinemessage.success.border.color')};
color: ${dt('inlinemessage.success.color')};
2024-05-06 21:23:42 +00:00
box-shadow: ${dt('inlinemessage.success.shadow')};
}
2024-05-09 15:35:57 +00:00
.p-inline-message-success .p-inline-message-icon {
color: ${dt('inlinemessage.success.color')};
}
.p-inline-message-warn {
background: ${dt('inlinemessage.warn.background')};
border: 1px solid ${dt('inlinemessage.warn.border.color')};
color: ${dt('inlinemessage.warn.color')};
2024-05-06 21:23:42 +00:00
box-shadow: ${dt('inlinemessage.warn.shadow')};
}
2024-05-09 15:35:57 +00:00
.p-inline-message-warn .p-inline-message-icon {
color: ${dt('inlinemessage.warn.color')};
}
.p-inline-message-error {
background: ${dt('inlinemessage.error.background')};
border: 1px solid ${dt('inlinemessage.error.border.color')};
color: ${dt('inlinemessage.error.color')};
2024-05-06 21:23:42 +00:00
box-shadow: ${dt('inlinemessage.error.shadow')};
}
2024-05-09 15:35:57 +00:00
.p-inline-message-error .p-inline-message-icon {
color: ${dt('inlinemessage.error.color')};
}
.p-inline-message-secondary {
background: ${dt('inlinemessage.secondary.background')};
border: 1px solid ${dt('inlinemessage.secondary.border.color')};
color: ${dt('inlinemessage.secondary.color')};
2024-05-06 21:23:42 +00:00
box-shadow: ${dt('inlinemessage.secondary.shadow')};
}
2024-05-09 15:35:57 +00:00
.p-inline-message-secondary .p-inline-message-icon {
color: ${dt('inlinemessage.secondary.color')};
}
.p-inline-message-contrast {
background: ${dt('inlinemessage.contrast.background')};
border: 1px solid ${dt('inlinemessage.contrast.border.color')};
color: ${dt('inlinemessage.contrast.color')};
2024-05-06 21:23:42 +00:00
box-shadow: ${dt('inlinemessage.contrast.shadow')};
}
2024-05-09 15:35:57 +00:00
.p-inline-message-contrast .p-inline-message-icon {
color: ${dt('inlinemessage.contrast.color')};
}
`;
const classes = {
root: ({ props, instance }) => ['p-inline-message p-component p-inline-message-' + props.severity, { 'p-inline-message-icon-only': !instance.$slots.default }],
icon: ({ props }) => ['p-inline-message-icon', props.icon],
text: 'p-inline-message-text'
};
export default BaseStyle.extend({
name: 'inlinemessage',
theme,
classes
});