Skip to content

Commit fa7ff30

Browse files
authored
Merge pull request #15 from expo-starter/fix/styling-tailwind
update file yml
2 parents 5e585c1 + 9c45b8f commit fa7ff30

File tree

7 files changed

+10
-16
lines changed

7 files changed

+10
-16
lines changed

.github/workflows/pwa-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: ./.github/actions/setup-bun-install
2222

2323
- name: ⚙️ Run Prebuild
24-
run: bunx tailwind -o node_modules/.cache/nativewind/styles.css && bun export
24+
run: bunx tailwind -o node_modules/.cache/nativewind/global.css && bun export
2525
shell: bash
2626

2727
- name: 📱 Publish web app

app/_layout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import "./styles.css";
1+
import "./global.css";
22
import {BottomSheetModalProvider} from "@gorhom/bottom-sheet";
33
import AsyncStorage from "@react-native-async-storage/async-storage";
44
import {type Theme, ThemeProvider} from "@react-navigation/native";

app/_layout.web.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "./global.css";
12
import {Button} from "@/components/ui";
23
import {DatabaseProvider} from "@/db/provider";
34
import {Link, Slot, Stack} from "expo-router";

app/styles.css app/global.css

File renamed without changes.

app/index.tsx

+1-11
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ export default function Screen() {
4545
function ScreenContent() {
4646
const {db} = useDatabase();
4747
const {data: habits, error} = useLiveQuery(db?.select().from(habitTable));
48-
const {theme, setTheme} = useTheme()
49-
// console.log("theme", theme)
48+
5049
const ref = React.useRef(null);
5150
useScrollToTop(ref);
5251

@@ -66,19 +65,10 @@ function ScreenContent() {
6665
return (
6766
<View className="flex flex-col basis-full bg-background p-8">
6867

69-
{/* <Button onPress={() => setTheme("light")}>
70-
<Text>Light mode</Text>
71-
</Button>
7268

73-
<Button onPress={() => setTheme('dark')}>
74-
<Text>Dark mode</Text>
75-
</Button> */}
7669
<Stack.Screen
7770
options={{
7871
title: "Habits",
79-
// headerTitleStyle: {
80-
// color: "hsl(var(--foreground))"
81-
// },
8272
headerRight: () => <ThemeToggle />,
8373
}}
8474
/>

metro.config.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const { withNativeWind } = require("nativewind/metro");
33

44
const config = getDefaultConfig(__dirname);
55

6-
config.resolver.sourceExts.push('sql');
6+
config.resolver.sourceExts.push("sql");
77

8-
module.exports = withNativeWind(config, { input: "./app/styles.css", configPath: "./tailwind.config.ts", });
8+
module.exports = withNativeWind(config, {
9+
input: "./app/global.css",
10+
configPath: "./tailwind.config.ts",
11+
});

tailwind.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { hairlineWidth } from "nativewind/theme";
55
export default {
66
darkMode: "class",
77
content: ["./app/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
8-
presets: [nativewind],
8+
presets: [require("nativewind/preset")],
99
theme: {
1010
extend: {
1111
colors: {

0 commit comments

Comments
 (0)