gluestack-ui
gluestack-ui copied to clipboard
type error on ejected components
Description
ejected components show type error "Type 'string' is not assignable to type 'AnimatableNumericValue | undefined'."
CodeSandbox/Snack link
No response
Steps to reproduce
- create a new project using
@gluestack/themed - eject https://gluestack.io/ui/docs/theme-configuration/customizing-theme/eject-library
- look at your ejected components. you see type errors. For example button:
gluestack-ui Version
"@gluestack-ui/themed": "1.1.9",
Platform
- [X] Expo
- [ ] React Native CLI
- [X] Next
- [X] Web
- [ ] Android
- [ ] iOS
Other Platform
No response
Additional Information
No response
as a partial fix, i added this to the generated gluestack-ui.config.ts:
type Config = typeof config;
declare module "@gluestack-style/react" {
interface ICustomConfig extends Config {}
}
in some cases this does not work, e.g. the LinearGradient somehow has no colors property