infinitered / ignite-bowser

Bowser is now re-integrated into Ignite CLI! Head to https://github.com/infinitered/ignite to check it out.
https://infinite.red/ignite
MIT License
615 stars 140 forks source link

text-field.props.ts causing type warnings #388

Closed Landson closed 3 years ago

Landson commented 3 years ago

What's going on?

The bowser text-field component has its preset in components/text-field/text-field.props.ts set to the string "default". This gives type warning messages when using the component and setting its preset prop to something other than the text "default".

Fix

Change text-field.props.ts preset from "default" to type string.

bryanstearns commented 3 years ago

Good catch, thanks @Landson -- a better fix would be to use the PRESETS definition itself to establish the preset prop's type, so that new preset names that you add to your app are automatically allowable in the prop.

I'm doing that in ignite-flame, but it's so close to release that I'm not planning on fixing Bowser. If you want to change your own Bowser-generated app this way,