Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThemeManager.setComponentTheme on View overrides Toast background #3463

Open
3 tasks
MoniAli opened this issue Dec 20, 2024 · 0 comments
Open
3 tasks

ThemeManager.setComponentTheme on View overrides Toast background #3463

MoniAli opened this issue Dec 20, 2024 · 0 comments
Labels
bug a bug in one of the components

Comments

@MoniAli
Copy link

MoniAli commented Dec 20, 2024

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
@MoniAli MoniAli added the bug a bug in one of the components label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components
Projects
None yet
Development

No branches or pull requests

1 participant