2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: ({ instance, props }) => [
|
2024-01-14 15:21:43 +00:00
|
|
|
'p-togglebutton p-component',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': props.disabled,
|
2024-01-30 11:27:56 +00:00
|
|
|
'p-highlight': instance.active,
|
|
|
|
'p-invalid': props.invalid
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-03-21 13:21:57 +00:00
|
|
|
button: 'p-togglebutton-button',
|
2023-10-02 10:46:09 +00:00
|
|
|
icon: ({ instance, props }) => [
|
2024-03-21 13:21:57 +00:00
|
|
|
'p-togglebutton-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
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
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-03-21 13:21:57 +00:00
|
|
|
label: 'p-togglebutton-label'
|
2023-10-02 10:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
2024-01-12 07:07:55 +00:00
|
|
|
name: 'togglebutton',
|
2023-10-04 09:20:15 +00:00
|
|
|
classes
|
2023-10-02 10:46:09 +00:00
|
|
|
});
|