Cweili / svelte-fa

Tiny FontAwesome component for Svelte

Home Page:https://cweili.github.io/svelte-fa/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript complains for valid size prop

gtm-nayan opened this issue · comments

Currently the size prop is typed as

      | 'xs'
      | 'sm'
      | 'lg'
      | '1x'
      | '2x'
      | '3x'
      | '4x'
      | '5x'
      | '6x'
      | '7x'
      | '8x'
      | '9x'
      | '10x'

However, the implementation of getStyle allows for any number suffixed by an x,
so the type could be changed to keep typescript from complaining,
Using template literal types should work.