From 262187d84330b8ec63be9867e53ba98fc5201480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 22 Jul 2022 22:08:02 +0300 Subject: [PATCH] Refactor #2801 - InputSwitch --- api-generator/components/inputswitch.js | 32 ++++++++++++--------- src/components/inputswitch/InputSwitch.d.ts | 24 ++++++++++------ src/components/inputswitch/InputSwitch.vue | 4 ++- src/views/inputswitch/InputSwitchDoc.vue | 30 +++++++++++-------- 4 files changed, 56 insertions(+), 34 deletions(-) diff --git a/api-generator/components/inputswitch.js b/api-generator/components/inputswitch.js index b05d8b32d..f37d5cb54 100644 --- a/api-generator/components/inputswitch.js +++ b/api-generator/components/inputswitch.js @@ -5,18 +5,6 @@ const InputSwitchProps = [ default: "null", description: "Specifies whether a inputswitch should be checked or not." }, - { - name: "class", - type: "string", - default: "null", - description: "Style class of the component." - }, - { - name: "style", - type: "any", - default: "null", - description: "Inline of the component." - }, { name: "trueValue", type: "any", @@ -28,7 +16,25 @@ const InputSwitchProps = [ type: "any", default: "null", description: "Value in unchecked state." - } + }, + { + name: "inputId", + type: "string", + default: "null", + description: "Identifier of the underlying input element." + }, + { + name: "inputStyle", + type: "any", + default: "null", + description: "Inline style of the input field." + }, + { + name: "inputClass", + type: "string", + default: "null", + description: "Style class of the input field." + }, ]; const InputSwitchEvents = [ diff --git a/src/components/inputswitch/InputSwitch.d.ts b/src/components/inputswitch/InputSwitch.d.ts index a4723b9ac..285baf60b 100755 --- a/src/components/inputswitch/InputSwitch.d.ts +++ b/src/components/inputswitch/InputSwitch.d.ts @@ -5,14 +5,6 @@ export interface InputSwitchProps { * Specifies whether a inputswitch should be checked or not. */ modelValue?: boolean | string | undefined; - /** - * Inline style of the component. - */ - class?: any; - /** - * Style class of the component input field. - */ - style?: any; /** * Value in checked state. */ @@ -21,6 +13,22 @@ export interface InputSwitchProps { * Value in unchecked state. */ falseValue?: any; + /** + * Identifier of the underlying input element. + */ + inputId?: string | undefined; + /** + * Style class of the input field. + */ + inputClass?: any | undefined; + /** + * Inline style of the input field. + */ + inputStyle?: any | undefined; + /** + * + */ + inputProps?: object | undefined; } export interface InputSwitchSlots { diff --git a/src/components/inputswitch/InputSwitch.vue b/src/components/inputswitch/InputSwitch.vue index 95a5ddf75..b78e3fd02 100755 --- a/src/components/inputswitch/InputSwitch.vue +++ b/src/components/inputswitch/InputSwitch.vue @@ -1,7 +1,7 @@