Skip to content

Commit

Permalink
refactor: [bc] Renames "size" –> "rows" and "scale" –> "size" of Form…
Browse files Browse the repository at this point in the history
…Select to keep API uniformity
  • Loading branch information
vatson committed Oct 15, 2020
1 parent 2405ded commit 43218e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/FormSelect/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
Expand Down Expand Up @@ -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' : '',
];
Expand All @@ -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 } }}
>
Expand Down

0 comments on commit 43218e6

Please sign in to comment.