diff --git a/apps/aelis-client/src/components/themed-text.tsx b/apps/aelis-client/src/components/themed-text.tsx deleted file mode 100644 index 8a77eca..0000000 --- a/apps/aelis-client/src/components/themed-text.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { StyleSheet, Text, type TextProps } from "react-native" - -import { useThemeColor } from "@/hooks/use-theme-color" - -export type ThemedTextProps = TextProps & { - lightColor?: string - darkColor?: string - type?: "default" | "title" | "defaultSemiBold" | "subtitle" | "link" -} - -export function ThemedText({ - style, - lightColor, - darkColor, - type = "default", - ...rest -}: ThemedTextProps) { - const color = useThemeColor({ light: lightColor, dark: darkColor }, "text") - - return ( - - ) -} - -const styles = StyleSheet.create({ - default: { - fontSize: 16, - lineHeight: 24, - }, - defaultSemiBold: { - fontSize: 16, - lineHeight: 24, - fontWeight: "600", - }, - title: { - fontSize: 32, - fontWeight: "bold", - lineHeight: 32, - }, - subtitle: { - fontSize: 20, - fontWeight: "bold", - }, - link: { - lineHeight: 30, - fontSize: 16, - color: "#0a7ea4", - }, -}) diff --git a/apps/aelis-client/src/constants/theme.ts b/apps/aelis-client/src/constants/theme.ts deleted file mode 100644 index 56b3c17..0000000 --- a/apps/aelis-client/src/constants/theme.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Below are the colors that are used in the app. The colors are defined in the light and dark mode. - * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc. - */ - -import { Platform } from "react-native" - -const tintColorLight = "#0a7ea4" -const tintColorDark = "#fff" - -export const Colors = { - light: { - text: "#11181C", - background: "#fff", - tint: tintColorLight, - icon: "#687076", - tabIconDefault: "#687076", - tabIconSelected: tintColorLight, - }, - dark: { - text: "#ECEDEE", - background: "#151718", - tint: tintColorDark, - icon: "#9BA1A6", - tabIconDefault: "#9BA1A6", - tabIconSelected: tintColorDark, - }, -} - -export const Fonts = Platform.select({ - ios: { - /** iOS `UIFontDescriptorSystemDesignDefault` */ - sans: "system-ui", - /** iOS `UIFontDescriptorSystemDesignSerif` */ - serif: "ui-serif", - /** iOS `UIFontDescriptorSystemDesignRounded` */ - rounded: "ui-rounded", - /** iOS `UIFontDescriptorSystemDesignMonospaced` */ - mono: "ui-monospace", - }, - default: { - sans: "normal", - serif: "serif", - rounded: "normal", - mono: "monospace", - }, - web: { - sans: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif", - serif: "Georgia, 'Times New Roman', serif", - rounded: "'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Meiryo, 'MS PGothic', sans-serif", - mono: "SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace", - }, -}) diff --git a/apps/aelis-client/src/hooks/use-color-scheme.ts b/apps/aelis-client/src/hooks/use-color-scheme.ts deleted file mode 100644 index 8999561..0000000 --- a/apps/aelis-client/src/hooks/use-color-scheme.ts +++ /dev/null @@ -1 +0,0 @@ -export { useColorScheme } from "react-native" diff --git a/apps/aelis-client/src/hooks/use-color-scheme.web.ts b/apps/aelis-client/src/hooks/use-color-scheme.web.ts deleted file mode 100644 index 07118f6..0000000 --- a/apps/aelis-client/src/hooks/use-color-scheme.web.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { useEffect, useState } from "react" -import { useColorScheme as useRNColorScheme } from "react-native" - -/** - * To support static rendering, this value needs to be re-calculated on the client side for web - */ -export function useColorScheme() { - const [hasHydrated, setHasHydrated] = useState(false) - - useEffect(() => { - setHasHydrated(true) - }, []) - - const colorScheme = useRNColorScheme() - - if (hasHydrated) { - return colorScheme - } - - return "light" -} diff --git a/apps/aelis-client/src/hooks/use-theme-color.ts b/apps/aelis-client/src/hooks/use-theme-color.ts deleted file mode 100644 index 8973ed8..0000000 --- a/apps/aelis-client/src/hooks/use-theme-color.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Learn more about light and dark modes: - * https://docs.expo.dev/guides/color-schemes/ - */ - -import { Colors } from "@/constants/theme" -import { useColorScheme } from "@/hooks/use-color-scheme" - -export function useThemeColor( - props: { light?: string; dark?: string }, - colorName: keyof typeof Colors.light & keyof typeof Colors.dark, -) { - const theme = useColorScheme() ?? "light" - const colorFromProps = props[theme] - - if (colorFromProps) { - return colorFromProps - } else { - return Colors[theme][colorName] - } -}