This commit is contained in:
Jorrin
2024-01-29 10:09:00 +01:00
parent e83bf1c806
commit 5baf4d6b86
13 changed files with 119 additions and 25 deletions

View File

@@ -1,5 +1,4 @@
import { Text } from 'react-native';
import { Text } from '../components/ui/Text';
import ScreenLayout from '../components/layout/ScreenLayout';
export default function AccountScreen() {

View File

@@ -1,4 +1,5 @@
import { ScrollView, Text, View } from 'react-native';
import { ScrollView, View } from 'react-native';
import { Text } from '../../components/ui/Text';
import Searchbar from './Searchbar';
import ScreenLayout from '../../components/layout/ScreenLayout';

View File

@@ -1,4 +1,4 @@
import { Text } from 'react-native';
import { Text } from '../components/ui/Text';
import ScreenLayout from '../components/layout/ScreenLayout';

View File

@@ -1,6 +1,6 @@
import { Link, Stack } from 'expo-router';
import { View } from 'react-native';
import { Text } from './components/ui/Text';
import { Text } from './components/ui/Text';
export default function NotFoundScreen() {
return (

View File

@@ -1,4 +1,5 @@
import { Image, Text, View } from 'react-native';
import { Image, View } from 'react-native';
import { Text } from '../../components/ui/Text';
import { TMDB_POSTER_PATH } from '../../constants/General';

View File

@@ -1,4 +1,5 @@
import { Text, View } from 'react-native';
import { View } from 'react-native';
import { Text } from '../../components/ui/Text';
type Props = {
title?: React.ReactNode | string;

View File

@@ -1,9 +1,17 @@
import { TextProps, Text as RNText } from 'react-native';
import { cn } from '../../lib/utils';
import { cva } from 'class-variance-authority';
import { Text as RNText, TextProps } from 'react-native';
const textVariants = cva('font-sans text-white');
import { cn } from '../../lib/utils';
export const Text = ({ className, ...props }: TextProps) => {
return <RNText className={cn(textVariants(), className)} {...props} />;
};
const textVariants = cva('text-white');
export function Text({ className, ...props }: TextProps) {
return (
<RNText
className={cn(className, textVariants(), {
'font-sans': !className?.includes('font-'),
})}
{...props}
/>
);
}

View File

@@ -1,5 +1,5 @@
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
import { twMerge } from 'tailwind-merge';
import { clsx, ClassValue } from 'clsx';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));