novacbn / kahi-ui

Straight-forward Svelte UI for the Web
https://kahi-ui.nbn.dev
MIT License
188 stars 5 forks source link

TextInput 'resizable' attribute type mismatch between 'boolean' and '"x" | "y"' #138

Open tvanriper opened 1 year ago

tvanriper commented 1 year ago

Describe the Bug

You get a ts(2322) error Type 'true' is not assignable to type '"x" | "y"' when you try to use <TextInput resizable /> in your component.

Reproduction

Within a svelte component where the project has TypeScript enabled:

<script lang="ts">
  import { TextInput } from "@kahi-ui/framework";
</script>

<TextInput resizable />

Note that using resizable="x" or resizable="y" doesn't seem to be valid, as it doesn't seem to result in a resizable TextInput, but maybe I missed something.

System Info

System:
    OS: Linux 5.15 Manjaro Linux
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 4.41 GB / 15.53 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.10.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.2 - /usr/bin/npm
  Browsers:
    Chromium: 107.0.5304.87
    Firefox: 106.0.2

Additional Context

Using typescript 4.84, tslib 2.4.1, if this helps.