Skip to content

'activeBackgroundColor' does not exist in type 'ViewStyle | TextStyle | ImageStyle' #30

@Technaur

Description

@Technaur

I have some jest test running on my app. I am using typescript 5.0.4 with React Native 0.73.0 and react-native-toggle-element 2.0.1.

I am getting this error when integrating my own custom themes.

Property 'thumbButtonStyle' is incompatible with index signature.
        Type '{ activeBackgroundColor: string; inActiveBackgroundColor: string; width: number; height: number; }' is not assignable to type 'ViewStyle | TextStyle | ImageStyle'.
          Object literal may only specify known properties, but 'activeBackgroundColor' does not exist in type 'ViewStyle | TextStyle | ImageStyle'. Did you mean to write 'backgroundColor'?

Has anyone experienced this issue before? How would I fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions