Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions template/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"react-intl": "^3.2.1",
"react-native": "0.63.0",
"react-native-config": "git+https://github.com/luggit/react-native-config.git",
"react-native-dynamic": "^1.0.0-rc.4",
"react-native-extended-stylesheet": "^0.12.0",
"react-native-gesture-handler": "^1.4.1",
"react-native-iphone-x-helper": "^1.2.1",
Expand Down
4 changes: 3 additions & 1 deletion template/src/ui/Text/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { ReactNode } from 'react';
import { useDarkMode } from 'react-native-dynamic';
import { Text as RNText, TextProps as RNTextProps, StyleProp, TextStyle } from 'react-native';
import EStyleSheet from 'react-native-extended-stylesheet';

Expand All @@ -15,8 +16,9 @@ export type TextProps = {
} & RNTextProps;

export function Text({ children, style, size = 'body1', weight = 'regular', color = '$black', ...props }: TextProps) {
const isDarkMode = useDarkMode();
const textColorStyle = EStyleSheet.create({
color: { color },
color: isDarkMode ? { color: 'white' } : { color },
});

return (
Expand Down