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

33 lines
841 B
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
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,
'p-invalid': props.invalid
}
],
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',
2023-10-04 09:20:15 +00:00
classes
});