-
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
My app has the ability to dynamically change the Tailwind theme. This is handled with the Nativewind var function documented here: https://www.nativewind.dev/docs/core-concepts/functions-and-directives#var
Here is an example of my ThemeProvider code:
return (
<NavigationThemeProvider value={themeToNavigationTheme(theme)}>
<StatusBar style={colorScheme} />
<ThemeContext.Provider value={value}>
<View className="flex-1" style={vars(themeToCSSVariables(theme))}>
{children}
{/* TODO: fix it so that this respects theme changes set by themeToCSSVariables in theme provider */}
<PortalHost />
</View>
</ThemeContext.Provider>
</NavigationThemeProvider>
);PortalHost doesn't respect the dynamic change in theme variables, but it does respect the variables defined in global.css and tailwind.config.ts.
Is there currently a way I can update the style of PortalHost dynamically, or do we need to expose a way for the PortalHost to pass a style prop to it's root view?
Metadata
Metadata
Assignees
Labels
No labels