primevue-mirror/components/lib/togglebutton/style/ToggleButtonStyle.js

52 lines
1.1 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const css = `
@layer primevue {
.p-togglebutton {
2024-01-14 15:21:43 +00:00
position: relative;
display: inline-flex;
user-select: none;
vertical-align: bottom;
}
.p-togglebutton-input {
cursor: pointer;
}
2024-01-14 15:21:43 +00:00
.p-togglebutton .p-button {
flex: 1 1 auto;
}
}
`;
const classes = {
root: ({ instance, props }) => [
2024-01-14 15:21:43 +00:00
'p-togglebutton p-component',
{
'p-disabled': props.disabled,
'p-highlight': instance.active
}
],
input: 'p-togglebutton-input',
2024-01-14 15:21:43 +00:00
box: ({ instance }) => [
'p-button p-component',
{
'p-button-icon-only': instance.hasIcon && !instance.hasLabel
}
],
icon: ({ instance, props }) => [
'p-button-icon',
{
'p-button-icon-left': props.iconPos === 'left' && instance.label,
'p-button-icon-right': props.iconPos === 'right' && instance.label
}
],
label: 'p-button-label'
};
export default BaseStyle.extend({
name: 'togglebutton',
css,
2023-10-04 09:20:15 +00:00
classes
});