Skip to content

Theme is not applied when using native-base-web with native-base-shoutem-theme #17

@naval200

Description

@naval200

I am using native-base-web with native-base-shoutem-theme ; but the custom theme changes are not applied to the DOM.

More details

I have customised the theme and have used console to see that it is loaded properly, when I do below at init.

import { Theme } from 'native-base-shoutem-theme';
import getThemeStyle from '../theme/components';

export default function setDefaultThemeStyle() {
  const theme = getThemeStyle();
  Theme.setDefaultThemeStyle(theme);
}

I have wrapped my code in a Style Provider.

import { StyleProvider } from 'native-base-shoutem-theme';
import getTheme from '../theme/components';
import variables from '../theme/variables/platform';
<StyleProvider style={getTheme(variables)}>
        <>
              {this.props.children}
        </>
</StyleProvider>

So I suspect that there is some fix which is needed in react-native-web.

Can I provide any more information or can you suggest me more ways to debug?

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