27 lines
989 B
JavaScript
27 lines
989 B
JavaScript
const { withAndroidStyles } = require("expo/config-plugins")
|
|
|
|
// Native controls and system bars must never fall back to device theme colors.
|
|
module.exports = (config) =>
|
|
withAndroidStyles(config, (config) => {
|
|
const theme = config.modResults.resources.style.find(
|
|
(style) => style.$.name === "AppTheme"
|
|
)
|
|
const colors = {
|
|
colorPrimary: "#FA2D48",
|
|
colorPrimaryDark: "#000000",
|
|
colorAccent: "#FA2D48",
|
|
"android:windowBackground": "#000000",
|
|
"android:statusBarColor": "#000000",
|
|
"android:navigationBarColor": "#000000",
|
|
"android:windowLightStatusBar": "false",
|
|
"android:windowLightNavigationBar": "false",
|
|
"android:enforceStatusBarContrast": "false",
|
|
"android:enforceNavigationBarContrast": "false",
|
|
}
|
|
for (const [name, value] of Object.entries(colors)) {
|
|
theme.item = theme.item.filter((item) => item.$.name !== name)
|
|
theme.item.push({ $: { name }, _: value })
|
|
}
|
|
return config
|
|
})
|