所以,我最近从 v2 升级到 v3
native-base
。
对于 v2,我正在使用这个:
<StyleProvider style={getTheme(material)}>
我用
getTheme from '../../native-base-theme/components'
和material from '../../native-base-theme/variables/material'
。
但是对于 v3,我需要使用这个:
const newColorTheme = {
brandPrimary: "#FFD100",
brandInfo: "#62B1F6",
brandSuccess: "#5cb85c",
brandDanger: "#d9534f",
brandWarning: "#f0ad4e",
brandDark: "#000",
brandLight: "#f4f4f4",
};
const theme = extendTheme({ colors: newColorTheme });
<NativeBaseProvider theme={theme}>
(newColorTheme 是一个例子)
我无法使用 v2n 中以前的主题方法,这是一个问题,因为我的整个应用程序都使用它......
有人作为解决方案? 谢谢!
你找到解决办法了吗,我也有同样的问题