useTheme applied globally
This commit is contained in:
parent
1f304d41f2
commit
9de2678922
12 changed files with 31 additions and 39 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { Platform, StyleSheet, View } from 'react-native'
|
||||
import { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes'
|
||||
import { useThemeColor } from '../../hooks/useThemeColor'
|
||||
import { useTheme } from '../../app/contexts/ThemeContext'
|
||||
|
||||
function generateBoxShadowStyle(
|
||||
xOffset: number,
|
||||
|
|
@ -18,7 +18,7 @@ function generateBoxShadowStyle(
|
|||
shadowOffset : {width: xOffset, height: yOffset},
|
||||
shadowOpacity,
|
||||
shadowRadius,
|
||||
backgroundColor: useThemeColor("backgroundColor")
|
||||
backgroundColor: useTheme().colors.backgroundColor
|
||||
}
|
||||
}else if (Platform.OS === 'android'){
|
||||
styles.boxShadow = {
|
||||
|
|
|
|||
Reference in a new issue