Skip to content

ThemeManager.setComponentTheme on View overrides Toast background #3463

Open
@MoniAli

Description

@MoniAli

Description

Component Theme on View for background color causes solid background on Toast. Internal views have no testIds or keys that can be used to target when it is related to a Toast.

Related to

  • [ X] Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

// App.tsx

    ThemeManager.setComponentTheme("View", (props: any, context: any) => {
        return {
            backgroundColor: Colors.$backgroundDefault,
        };
    });

// Anywhere else

      <Toast
        onDismiss={hideToast}
        swipeable
        position="top"
        autoDismiss={3000}
        {...toastConfig}
      />

Expected behavior

I expect the Toast to continue to be transparent, regardless of the View styling applied via the Theme Manager

Actual behavior

The Toast now has a solid background, and cannot be overriden via props due to internal usage of the View.

Environment

  • React Native version: "react-native": "0.74.5"
  • React Native UI Lib version: "react-native-ui-lib": "^7.34.0"

Affected platforms

  • [X ] Android
  • [X ] iOS
  • [ X] Web

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in one of the componentswontfix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions