File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/core/src/Typography Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
import React , { Fragment } from 'react' ;
2
- import { Text , TextProps , ViewProps } from 'react-native' ;
3
- import { Theme } from '../theme' ;
4
- import { useTheme } from '@shopify/restyle' ;
2
+ import { TextProps , ViewProps } from 'react-native' ;
3
+ import Text from './Text' ;
5
4
6
5
interface DivProps {
7
6
children ?: React . ReactNode ;
8
7
}
9
8
10
9
export default function Div < T > ( { children, ...otherProps } : DivProps & TextProps & ViewProps ) : JSX . Element | null {
11
- const theme = useTheme < Theme > ( ) ;
12
- const textColor = theme . colors . primary_text || '#ccc' ;
13
10
if ( ! children ) {
14
11
return null ;
15
12
}
@@ -18,7 +15,7 @@ export default function Div<T>({ children, ...otherProps }: DivProps & TextProps
18
15
return typeof item === 'string' || ( item && ( item as any ) . type && ( item as any ) . type . displayName === 'Text' ) ;
19
16
} ) ;
20
17
if ( someStr ) {
21
- return < Text { ...otherProps } children = { children } style = { { color : textColor } } /> ;
18
+ return < Text color = "text" { ...otherProps } children = { children } /> ;
22
19
}
23
20
return (
24
21
< Fragment >
You can’t perform that action at this time.
0 commit comments