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

27 lines
706 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
}
],
2024-03-21 13:21:57 +00:00
button: 'p-togglebutton-button',
icon: ({ instance, props }) => [
2024-03-21 13:21:57 +00:00
'p-togglebutton-icon',
{
2024-03-21 13:21:57 +00:00
'p-togglebutton-icon-left': props.iconPos === 'left' && instance.label,
'p-togglebutton-icon-right': props.iconPos === 'right' && instance.label
}
],
2024-03-21 13:21:57 +00:00
label: 'p-togglebutton-label'
};
export default BaseStyle.extend({
name: 'togglebutton',
2023-10-04 09:20:15 +00:00
classes
});