From c46482cdaaf883971736488750513663dd023076 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 17 Apr 2024 17:56:21 +0100 Subject: mobile: Add dark mode support --- apps/mobile/components/ui/Divider.tsx | 5 +---- apps/mobile/components/ui/FullPageSpinner.tsx | 2 +- apps/mobile/components/ui/Input.tsx | 21 +++++++++++++++------ apps/mobile/components/ui/PageTitle.tsx | 4 +++- 4 files changed, 20 insertions(+), 12 deletions(-) (limited to 'apps/mobile/components/ui') diff --git a/apps/mobile/components/ui/Divider.tsx b/apps/mobile/components/ui/Divider.tsx index cf1b4624..fbc5cf64 100644 --- a/apps/mobile/components/ui/Divider.tsx +++ b/apps/mobile/components/ui/Divider.tsx @@ -2,7 +2,6 @@ import { View } from "react-native"; import { cn } from "@/lib/utils"; function Divider({ - color = "#DFE4EA", className, orientation, ...props @@ -10,15 +9,13 @@ function Divider({ color?: string; orientation: "horizontal" | "vertical"; } & React.ComponentPropsWithoutRef) { - const dividerStyles = [{ backgroundColor: color }]; - return ( ); diff --git a/apps/mobile/components/ui/FullPageSpinner.tsx b/apps/mobile/components/ui/FullPageSpinner.tsx index 89b66090..5436937a 100644 --- a/apps/mobile/components/ui/FullPageSpinner.tsx +++ b/apps/mobile/components/ui/FullPageSpinner.tsx @@ -2,7 +2,7 @@ import { ActivityIndicator, View } from "react-native"; export default function FullPageSpinner() { return ( - + ); diff --git a/apps/mobile/components/ui/Input.tsx b/apps/mobile/components/ui/Input.tsx index 01c9fb2f..57d16f5d 100644 --- a/apps/mobile/components/ui/Input.tsx +++ b/apps/mobile/components/ui/Input.tsx @@ -2,6 +2,8 @@ import { forwardRef } from "react"; import { Text, TextInput, View } from "react-native"; import { cn } from "@/lib/utils"; +import { TailwindResolver } from "../TailwindResolver"; + export interface InputProps extends React.ComponentPropsWithoutRef { label?: string; @@ -13,13 +15,20 @@ const Input = forwardRef, InputProps>( ({ className, label, labelClasses, inputClasses, ...props }, ref) => ( {label && {label}} - ( + )} - {...props} /> ), diff --git a/apps/mobile/components/ui/PageTitle.tsx b/apps/mobile/components/ui/PageTitle.tsx index 57b19e7d..1c1543ce 100644 --- a/apps/mobile/components/ui/PageTitle.tsx +++ b/apps/mobile/components/ui/PageTitle.tsx @@ -1,5 +1,7 @@ import { Text } from "react-native"; export default function PageTitle({ title }: { title: string }) { - return {title}; + return ( + {title} + ); } -- cgit v1.2.3-70-g09d2