如果这很重要,我正在使用next.js
并且我pages/_app.tsx
有:
function MyApp({ Component, pageProps }: AppProps) {
return (
<PaperProvider theme={customTheme}>
<View style={{ flex: 1, top: 0, left: 0, height: '100%', width: '100%', zIndex: 10, position: 'absolute', backgroundColor: 'red' }}>
<Text> Here</Text>
</View>
</PaperProvider>
)
}
export default MyApp
并且customTheme
是:
import { DefaultTheme } from 'react-native-paper';
export const customTheme = {
...DefaultTheme,
dark: false,
colors: {
...DefaultTheme.colors,
primary: '#247BA0',
accent: '#70C1B3',
error: '#FF1654',
disabled: '#F3FFBD',
placeholder: '#D3EDBE',
}
}
我看到了Text
,但没有红色背景。我错过了什么?