ivopr / tamagui-expo

An Expo template with Tamagui
270 stars 22 forks source link

SafeAreaView doesn't play nice with dark mode #36

Closed jackbcodes closed 1 year ago

jackbcodes commented 1 year ago

Thanks for this repo! Just trying it out and SafeAreaView stays white when you enter dark mode.

I added this in my code, would you be open to a PR?

  const SafeAreaView = styled(DefaultSafeAreaView, {
    backgroundColor: "$backgroundStrong",
    flex: 1
  });

  return (
    <TamaguiProvider config={config}>
      <Suspense fallback={<Text>Loading...</Text>}>
        <Theme name={colorScheme}>
          <ThemeProvider
            value={colorScheme === "light" ? DefaultTheme : DarkTheme}
          >
            <SafeAreaView>
              <Stack
                screenOptions={{
                  headerShown: false
                }}
              />
            </SafeAreaView>
          </ThemeProvider>
        </Theme>
      </Suspense>
    </TamaguiProvider>
  );
ivopr commented 1 year ago

Hey there, thanks. If you could open a PR I would be delighted to check it out and merge

jackbcodes commented 1 year ago

Cool, PR 👉 #37

ivopr commented 1 year ago

I've merged the PR and forgot to close the issue, my bad hehe

jackbcodes commented 1 year ago

Haha, I've got another suggestion if you're open to it?

I've added "@/" as an alias, which is quite common in Next and Remix templates now. I could open a PR for that?

E.g.

import { MyStack } from "@/components/MyStack"

ivopr commented 1 year ago

@jackbcodes feel free to keep 'em coming. I don't have as much time as before but I'll do my best to Review and merge them