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

Facing error while using theme #485

Open
cksharma11 opened this issue Oct 4, 2020 · 0 comments
Open

Facing error while using theme #485

cksharma11 opened this issue Oct 4, 2020 · 0 comments

Comments

@cksharma11
Copy link

Hey,

I'm trying to use the library but getting error
Not able to identify what can be the issue
image

node: 12.18.0
npm: 6.14
OS: Mac

import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';

import React from 'react';
import Dashboard from './components/Dashboard/Dashboard';
import Login from './components/Login/Login';
import Signup from './components/Signup/Signup';
import SubService from './components/SubService/SubService';
import { SCREENS } from './screens/screens';

import { COLOR, ThemeContext, getTheme } from 'react-native-material-ui';

// you can set your style right here, it'll be propagated to application
const uiTheme = {
  palette: {
    primaryColor: COLOR.green500,
  },
  toolbar: {
    container: {
      height: 50,
    },
  },
};

const Stack = createStackNavigator();

export default function App() {
  return (
    <ThemeContext.Provider value={getTheme(uiTheme)}>
      <NavigationContainer>
        <Stack.Navigator>
          <Stack.Screen name={SCREENS.home} component={Login} />
          <Stack.Screen name={SCREENS.signup} component={Signup} />
          <Stack.Screen name={SCREENS.dashboard} component={Dashboard} />
          <Stack.Screen name={SCREENS.subService} component={SubService} />
        </Stack.Navigator>
      </NavigationContainer>
    </ThemeContext.Provider>
  );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant