From 43218e6a9e7c9fbe3fb7f32349274625c5ad0bbb Mon Sep 17 00:00:00 2001 From: Vadim Tiukov Date: Thu, 15 Oct 2020 16:49:24 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20[bc]=20Renames=20"size"=20=E2=80=93?= =?UTF-8?q?>=20"rows"=20and=20"scale"=20=E2=80=93>=20"size"=20of=20FormSel?= =?UTF-8?q?ect=20=20to=20keep=20API=20uniformity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormSelect/Select.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/FormSelect/Select.tsx b/src/components/FormSelect/Select.tsx index 5b2d203..056a0bd 100644 --- a/src/components/FormSelect/Select.tsx +++ b/src/components/FormSelect/Select.tsx @@ -31,8 +31,8 @@ export const FormSelect = /*#__PURE__*/ tsx multiple: { type: Boolean }, placeholder: { type: String }, value: { type: [String, Number, Array as () => string[] | number[]], default: '' }, - size: { type: [String, Number] }, - scale: { + rows: { type: [String, Number] }, + size: { type: String as () => FormSelectSize, validator: (size: FormSelectSize): boolean => Object.keys(FormSelectSizes).includes(size), }, @@ -126,7 +126,7 @@ export const FormSelect = /*#__PURE__*/ tsx const cssClass = [ 'form-select', - FormSelectSizes[this.scale], + FormSelectSizes[this.size], this.error ? 'is-error' : '', this.success ? 'is-success' : '', ]; @@ -136,7 +136,7 @@ export const FormSelect = /*#__PURE__*/ tsx class={cssClass} multiple={this.multiple} disabled={this.disabled} - size={Number(this.size)} + size={Number(this.rows)} {...{ attrs: { ...this.__attrs } }} {...{ on: { ...this.__listeners, input: this.onInput } }} >