Skip to content

Commit

Permalink
faet(expo): color config improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Nov 13, 2023
1 parent 6459db1 commit 74afc14
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Platform } from "react-native";
import { Button, Colors, Spacings } from "react-native-ui-lib";
import { Redirect, Tabs } from "expo-router";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import { useUser } from "@clerk/clerk-expo";
import Ionicons from "@expo/vector-icons/Ionicons";

Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/[productId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "react-native-ui-lib";
import { Link, usePathname } from "expo-router";
import { api } from "@/utils/api";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import rupiahFormatter from "@/utils/rupiahFormatter";
import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";

Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { TouchableOpacity } from "react-native-gesture-handler";
import { Link, Stack } from "expo-router";
import Header from "@/components/Header";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import { Ionicons } from "@expo/vector-icons";

export default function AuthLayout() {
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/checkout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Text, TouchableOpacity, View } from "react-native-ui-lib";
import { Link } from "expo-router";
import { api } from "@/utils/api";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import { Ionicons } from "@expo/vector-icons";

export default function CheckoutScreen() {
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Link } from "expo-router";
import { useDebouncedValue } from "@/lib/hooks/useDebouncedValues";
import { useSearchStore } from "@/lib/stores/useSearchStore";
import { api } from "@/utils/api";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import rupiahFormatter from "@/utils/rupiahFormatter";
import { FlashList } from "@shopify/flash-list";

Expand Down
5 changes: 3 additions & 2 deletions apps/expo/src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { useEffect } from "react";
import { LoaderScreen } from "react-native-ui-lib";
import { Colors, LoaderScreen } from "react-native-ui-lib";
import Constants from "expo-constants";
import { Slot, Stack } from "expo-router";
import * as SplashScreen from "expo-splash-screen";
import { StatusBar } from "expo-status-bar";
import { TRPCProvider } from "@/utils/api";
import { tokenCache } from "@/utils/cache";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import { ClerkProvider, SignedIn, SignedOut, useAuth } from "@clerk/clerk-expo";

Colors.loadColors(colors);
void SplashScreen.preventAutoHideAsync();

function InitialLayout() {
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Colors, Image, View } from "react-native-ui-lib";
import { LinearGradient } from "expo-linear-gradient";
import { Redirect } from "expo-router";
import SignInButton from "@/components/SignInButton";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import { useAuth } from "@clerk/clerk-expo";

import Logo from "~/full-logo.png";
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/components/forms/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TextFieldProps } from "react-native-ui-lib";
import { BorderRadiuses, Spacings, TextField } from "react-native-ui-lib";
import { colors } from "@/utils/constant";
import colors from "@/utils/colors";
import { Controller, get, useFormContext } from "react-hook-form";

type InputProps = {
Expand Down
4 changes: 4 additions & 0 deletions apps/expo/src/utils/colors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
primary: "#157DC1",
secondary: "#FDBC12",
};
11 changes: 0 additions & 11 deletions apps/expo/src/utils/constant.ts

This file was deleted.

8 changes: 3 additions & 5 deletions apps/expo/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import type { Config } from "tailwindcss";

import baseConfig from "@vivat/tailwind-config";
import { colors } from "@/utils/constant";

import colors from "@/utils/colors";

export default {
content: ["./src/**/*.{ts,tsx}"],
presets: [baseConfig],
theme: {
extend: {
colors: {
primary: colors.primary,
secondary: colors.secondary,
},
colors: colors,
},
},
} satisfies Config;

0 comments on commit 74afc14

Please sign in to comment.