From 50d6c5ca32051f2369283e76357518feeca151aa Mon Sep 17 00:00:00 2001
From: Adrian Castro <22133246+castdrian@users.noreply.github.com>
Date: Sun, 10 Mar 2024 10:41:43 +0100
Subject: [PATCH] fix: use stylesheets here because nativewind is broken on iOS
---
apps/expo/src/app/(tabs)/_layout.tsx | 34 +++++---
.../expo/src/components/player/ScrapeCard.tsx | 81 +++++++++++++++----
2 files changed, 90 insertions(+), 25 deletions(-)
diff --git a/apps/expo/src/app/(tabs)/_layout.tsx b/apps/expo/src/app/(tabs)/_layout.tsx
index 905acc9..f431d48 100644
--- a/apps/expo/src/app/(tabs)/_layout.tsx
+++ b/apps/expo/src/app/(tabs)/_layout.tsx
@@ -1,5 +1,5 @@
import { useRef } from "react";
-import { Platform, View } from "react-native";
+import { Platform, StyleSheet, View } from "react-native";
import * as Haptics from "expo-haptics";
import { Tabs } from "expo-router";
import * as ScreenOrientation from "expo-screen-orientation";
@@ -9,7 +9,6 @@ import { defaultTheme } from "@movie-web/tailwind-config/themes";
import { MovieWebSvg } from "~/components/Icon";
import SvgTabBarIcon from "~/components/SvgTabBarIcon";
import TabBarIcon from "~/components/TabBarIcon";
-import { cn } from "~/lib/utils";
import SearchTabContext from "../../components/ui/SearchTabContext";
export default function TabLayout() {
@@ -84,13 +83,10 @@ export default function TabLayout() {
tabBarLabel: "",
tabBarIcon: ({ focused }) => (
@@ -121,3 +117,23 @@ export default function TabLayout() {
);
}
+
+const styles = StyleSheet.create({
+ searchTab: {
+ top: 2,
+ height: 56, // 14 units in your scale
+ width: 56, // 14 units in your scale
+ alignItems: "center",
+ justifyContent: "center",
+ overflow: "hidden",
+ borderRadius: 100,
+ textAlign: "center",
+ // 'alignMiddle' and 'text2xl' would be dependent on your specific implementation
+ },
+ active: {
+ backgroundColor: defaultTheme.extend.colors.tabBar.active,
+ },
+ inactive: {
+ backgroundColor: defaultTheme.extend.colors.tabBar.inactive,
+ },
+});
diff --git a/apps/expo/src/components/player/ScrapeCard.tsx b/apps/expo/src/components/player/ScrapeCard.tsx
index 67bdcf7..10eb181 100644
--- a/apps/expo/src/components/player/ScrapeCard.tsx
+++ b/apps/expo/src/components/player/ScrapeCard.tsx
@@ -1,11 +1,10 @@
import type { ReactNode } from "react";
import React from "react";
-import { View } from "react-native";
+import { StyleSheet, View } from "react-native";
import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";
import { defaultTheme } from "@movie-web/tailwind-config/themes";
-import { cn } from "~/lib/utils";
import { Text } from "../ui/Text";
export interface ScrapeItemProps {
@@ -83,37 +82,87 @@ export function ScrapeItem(props: ScrapeItemProps) {
const text = statusTextMap[props.status];
return (
-
-
+
+
{props.name}
-
-
- {text && {text}}
+
+
+ {text && {text}}
- {props.children}
+ {props.children}
);
}
export function ScrapeCard(props: ScrapeCardProps) {
return (
-
+
);
}
+
+const styles = StyleSheet.create({
+ scrapeItemContainer: {
+ flex: 1,
+ flexDirection: "column",
+ },
+ itemRow: {
+ flexDirection: "row",
+ alignItems: "center",
+ gap: 16,
+ },
+ itemText: {
+ fontSize: 18,
+ },
+ textPending: {
+ color: "white",
+ },
+ textSecondary: {
+ color: "secondaryColor",
+ },
+ textRow: {
+ flexDirection: "row",
+ gap: 16,
+ },
+ spacer: {
+ width: 40,
+ },
+ statusText: {
+ marginTop: 4,
+ fontSize: 18,
+ },
+ childrenContainer: {
+ marginLeft: 48,
+ },
+ cardContainer: {
+ width: 384,
+ },
+ cardContent: {
+ width: 384,
+ borderRadius: 10,
+ paddingVertical: 12,
+ paddingHorizontal: 24,
+ },
+ cardBackground: {
+ backgroundColor: "cardBackgroundColor",
+ },
+});