mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3922 - For ToggleButton
This commit is contained in:
parent
53b595a236
commit
f624aa2b9f
3 changed files with 22 additions and 26 deletions
16
components/lib/togglebutton/ToggleButton.d.ts
vendored
16
components/lib/togglebutton/ToggleButton.d.ts
vendored
|
@ -29,14 +29,6 @@ export interface ToggleButtonPassThroughOptions {
|
|||
* Uses to pass attributes to the root's DOM element.
|
||||
*/
|
||||
root?: ToggleButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the input aria's DOM element.
|
||||
*/
|
||||
inputAria?: ToggleButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the input's DOM element.
|
||||
*/
|
||||
input?: ToggleButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the icon's DOM element.
|
||||
*/
|
||||
|
@ -45,6 +37,14 @@ export interface ToggleButtonPassThroughOptions {
|
|||
* Uses to pass attributes to the label's DOM element.
|
||||
*/
|
||||
label?: ToggleButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the hidden input wrapper's DOM element.
|
||||
*/
|
||||
hiddenInputWrapper?: ToggleButtonPassThroughOptionType;
|
||||
/**
|
||||
* Uses to pass attributes to the hidden input's DOM element.
|
||||
*/
|
||||
hiddenInput?: ToggleButtonPassThroughOptionType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div ref="container" v-ripple :class="buttonClass" @click="onClick($event)" v-bind="ptm('root')">
|
||||
<span class="p-hidden-accessible" v-bind="ptm('inputAria')">
|
||||
<span class="p-hidden-accessible" v-bind="ptm('hiddenInputWrapper')">
|
||||
<input
|
||||
:id="inputId"
|
||||
type="checkbox"
|
||||
|
@ -13,7 +13,7 @@
|
|||
:aria-label="ariaLabel"
|
||||
@focus="onFocus($event)"
|
||||
@blur="onBlur($event)"
|
||||
v-bind="{ ...inputProps, ...ptm('input') }"
|
||||
v-bind="{ ...inputProps, ...ptm('hiddenInput') }"
|
||||
/>
|
||||
</span>
|
||||
<slot name="icon" :value="modelValue" :class="iconClass">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue