69 lines
1.4 KiB
Vue
69 lines
1.4 KiB
Vue
<script>
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
import ToggleButtonStyle from 'primevue/togglebutton/style';
|
|
|
|
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
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
readonly: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
tabindex: {
|
|
type: Number,
|
|
default: null
|
|
},
|
|
inputId: {
|
|
type: String,
|
|
default: null
|
|
},
|
|
inputClass: {
|
|
type: [String, Object],
|
|
default: null
|
|
},
|
|
inputStyle: {
|
|
type: Object,
|
|
default: null
|
|
},
|
|
ariaLabelledby: {
|
|
type: String,
|
|
default: null
|
|
},
|
|
ariaLabel: {
|
|
type: String,
|
|
default: null
|
|
}
|
|
},
|
|
style: ToggleButtonStyle,
|
|
provide() {
|
|
return {
|
|
$parentInstance: this
|
|
};
|
|
}
|
|
};
|
|
</script>
|