Closed Landson closed 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,
text-field.props.ts
into text-field.tsx
after the PRESETS
definition, and git-remove text-field.props.ts
TextFieldProps
declaration of the presets
prop from "default"
to key typeof PRESETS
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.