primevue-mirror/components/lib/togglebutton/BaseToggleButton.vue

57 lines
1.2 KiB
Vue
Raw Normal View History

2023-05-24 14:26:41 +00:00
<script>
import BaseComponent from 'primevue/basecomponent';
import ToggleButtonStyle from 'primevue/togglebutton/style';
2023-05-24 14:26:41 +00:00
export default {
name: 'BaseToggleButton',
extends: BaseComponent,
props: {
modelValue: Boolean,
onIcon: String,
offIcon: String,
onLabel: {
type: String,
default: 'Yes'
},
offLabel: {
type: String,
default: 'No'
},
iconPos: {
type: String,
default: 'left'
},
invalid: {
type: Boolean,
default: false
},
2023-05-24 14:26:41 +00:00
disabled: {
type: Boolean,
default: false
},
2024-01-14 13:38:51 +00:00
readonly: {
type: Boolean,
default: false
},
2023-05-24 14:26:41 +00:00
tabindex: {
type: Number,
default: null
},
ariaLabelledby: {
2023-05-24 14:26:41 +00:00
type: String,
default: null
},
ariaLabel: {
2023-05-24 14:26:41 +00:00
type: String,
default: null
}
},
style: ToggleButtonStyle,
provide() {
return {
$parentInstance: this
};
2023-05-24 14:26:41 +00:00
}
};
</script>