diff --git a/README.md b/README.md
index 67718c2..235aa8f 100644
--- a/README.md
+++ b/README.md
@@ -57,15 +57,27 @@ Add the library plugin in your `app.json` config file and [create a new build](h
}
```
+_📌 The available plugins options are:_
+
+```ts
+type Options = {
+ android?: {
+ // use an edge-to-edge version of `Theme.{MaterialComponents,Material3}.DayNight.NoActionBar`
+ parentTheme?: "Material2" | "Material3"; // optional, default is `undefined` (`Theme.EdgeToEdge`)
+ };
+};
+```
+
> [!NOTE]
> This library is not yet supported in the [Expo Go](https://expo.dev/go) sandbox app.
### Bare React Native
-Edit your `android/app/src/main/res/values/styles.xml` file to inherit from the provided theme:
+Edit your `android/app/src/main/res/values/styles.xml` file to inherit from one of the provided themes:
```diff
+
-
-
diff --git a/android/src/main/res/values-night/bools.xml b/android/src/main/res/values-night/bools.xml
new file mode 100644
index 0000000..5315da4
--- /dev/null
+++ b/android/src/main/res/values-night/bools.xml
@@ -0,0 +1,4 @@
+
+
+ false
+
diff --git a/android/src/main/res/values-night/styles.xml b/android/src/main/res/values-night/styles.xml
deleted file mode 100644
index 7308872..0000000
--- a/android/src/main/res/values-night/styles.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
diff --git a/android/src/main/res/values-v27/bools.xml b/android/src/main/res/values-v27/bools.xml
new file mode 100644
index 0000000..966590f
--- /dev/null
+++ b/android/src/main/res/values-v27/bools.xml
@@ -0,0 +1,4 @@
+
+
+ true
+
diff --git a/android/src/main/res/values-v27/styles.xml b/android/src/main/res/values-v27/styles.xml
index 61f85c2..ae5862d 100644
--- a/android/src/main/res/values-v27/styles.xml
+++ b/android/src/main/res/values-v27/styles.xml
@@ -1,11 +1,17 @@
-
-
+
+
diff --git a/android/src/main/res/values-v29/styles.xml b/android/src/main/res/values-v29/styles.xml
index 6658b45..856bf21 100644
--- a/android/src/main/res/values-v29/styles.xml
+++ b/android/src/main/res/values-v29/styles.xml
@@ -1,6 +1,21 @@
+
+
+
+
+
+
+
+
-
-
+
+
+
+
diff --git a/example/Gemfile.lock b/example/Gemfile.lock
index 07ff700..d6eef29 100644
--- a/example/Gemfile.lock
+++ b/example/Gemfile.lock
@@ -5,8 +5,9 @@ GEM
base64
nkf
rexml
- activesupport (7.2.1.2)
+ activesupport (7.2.2)
base64
+ benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
@@ -23,6 +24,7 @@ GEM
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
+ benchmark (0.3.0)
bigdecimal (3.1.8)
claide (1.1.0)
cocoapods (1.15.2)
@@ -76,7 +78,7 @@ GEM
httpclient (2.8.3)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
- json (2.7.5)
+ json (2.7.6)
logger (1.6.1)
minitest (5.25.1)
molinillo (0.8.0)
@@ -112,4 +114,4 @@ RUBY VERSION
ruby 3.3.4p94
BUNDLED WITH
- 2.5.14
+ 2.5.18
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 98aaec5..f34f9e3 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -1242,7 +1242,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- - react-native-safe-area-context (4.12.0):
+ - react-native-safe-area-context (4.14.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1255,8 +1255,8 @@ PODS:
- React-featureflags
- React-graphics
- React-ImageManager
- - react-native-safe-area-context/common (= 4.12.0)
- - react-native-safe-area-context/fabric (= 4.12.0)
+ - react-native-safe-area-context/common (= 4.14.0)
+ - react-native-safe-area-context/fabric (= 4.14.0)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
@@ -1265,7 +1265,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- - react-native-safe-area-context/common (4.12.0):
+ - react-native-safe-area-context/common (4.14.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1286,7 +1286,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- - react-native-safe-area-context/fabric (4.12.0):
+ - react-native-safe-area-context/fabric (4.14.0):
- DoubleConversion
- glog
- hermes-engine
@@ -1870,7 +1870,7 @@ SPEC CHECKSUMS:
React-logger: 97c9dafae1f1a638001a9d1d0e93d431f2f9cb7b
React-Mapbuffer: 3146a13424f9fec2ea1f1462d49d566e4d69b732
React-microtasksnativemodule: 02d218c79c72d373a92a8552183f4ead0d1c6e05
- react-native-safe-area-context: 458f6b948437afcb59198016b26bbd02ff9c3b47
+ react-native-safe-area-context: 2500e4fe998caad50ad3bc51ec23ef951308569e
react-native-segmented-control: 6a1ba93bd548d4706df5f472e8c71aea84874d92
React-nativeconfig: 93fe8c85a8c40820c57814e30f3e44b94c995a7b
React-NativeModulesApple: b3e076fd0d7b73417fe1e8c8b26e3c57ae9b74aa
diff --git a/example/package.json b/example/package.json
index c978aac..88b22bf 100644
--- a/example/package.json
+++ b/example/package.json
@@ -18,7 +18,7 @@
"react": "18.3.1",
"react-native": "0.76.1",
"react-native-edge-to-edge": "link:../",
- "react-native-safe-area-context": "4.12.0",
+ "react-native-safe-area-context": "4.14.0",
"react-native-screens": "3.35.0"
},
"devDependencies": {
diff --git a/example/src/App.tsx b/example/src/App.tsx
index e0d492f..6717bed 100644
--- a/example/src/App.tsx
+++ b/example/src/App.tsx
@@ -4,11 +4,10 @@ import {
createNativeStackNavigator,
NativeStackScreenProps,
} from "@react-navigation/native-stack";
-import { ReactNode, useState } from "react";
+import { ReactNode, useEffect, useState } from "react";
import {
Appearance,
Text as BaseText,
- ColorSchemeName,
Modal,
Platform,
StyleProp,
@@ -101,6 +100,7 @@ const Button = ({
);
};
+const SCHEMES = ["system", "light", "dark"];
const STYLES: SystemBarStyle[] = ["auto", "light", "dark"];
type StackParamList = {
@@ -160,11 +160,18 @@ export const HomeScreen = ({
? { false: "#1c1c1f", true: "#2b3e55" }
: { false: "#eeeef0", true: "#ccd8e5" };
+ const [schemeIndex, setSchemeIndex] = useState(0);
const [styleIndex, setStyleIndex] = useState(0);
const [statusBarHidden, setStatusBarHidden] = useState(false);
const [navigationBarHidden, setNavigationBarHidden] = useState(false);
const [reactNativeModalVisible, setReactNativeModalVisible] = useState(false);
+ useEffect(() => {
+ const value = SCHEMES[schemeIndex];
+ const scheme = value === "light" || value === "dark" ? value : null;
+ Appearance.setColorScheme(scheme);
+ }, [schemeIndex]);
+
const closeReactNativeModal = () => {
setReactNativeModalVisible(false);
};
@@ -182,10 +189,10 @@ export const HomeScreen = ({
Theme
{
- Appearance.setColorScheme(value as ColorSchemeName);
+ setSchemeIndex(SCHEMES.indexOf(value));
}}
/>
diff --git a/example/yarn.lock b/example/yarn.lock
index 1d294fe..aba8a3e 100644
--- a/example/yarn.lock
+++ b/example/yarn.lock
@@ -1698,9 +1698,9 @@
"@types/node" "*"
"@types/node@*":
- version "22.8.4"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.4.tgz#ab754f7ac52e1fe74174f761c5b03acaf06da0dc"
- integrity sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==
+ version "22.9.0"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365"
+ integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==
dependencies:
undici-types "~6.19.8"
@@ -1748,7 +1748,7 @@ abort-controller@^3.0.0:
dependencies:
event-target-shim "^5.0.0"
-accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7:
+accepts@^1.3.7, accepts@~1.3.7:
version "1.3.8"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
@@ -2009,7 +2009,7 @@ braces@^3.0.3:
dependencies:
fill-range "^7.1.1"
-browserslist@^4.23.3, browserslist@^4.24.0:
+browserslist@^4.24.0, browserslist@^4.24.2:
version "4.24.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580"
integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==
@@ -2039,10 +2039,10 @@ buffer@^5.5.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"
-bytes@3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
- integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==
+bytes@3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
+ integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
caller-callsite@^2.0.0:
version "2.0.0"
@@ -2079,9 +2079,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001669:
- version "1.0.30001675"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001675.tgz#0c1f01fc9cc543b61839753a4c234f995588d1b9"
- integrity sha512-/wV1bQwPrkLiQMjaJF5yUMVM/VdRPOCU8QZ+PmG6uW6DvYSrNY1bpwHI/3mOcUosLaJCzYDi5o91IQB51ft6cg==
+ version "1.0.30001677"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz#27c2e2c637e007cfa864a16f7dfe7cde66b38b5f"
+ integrity sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
version "4.1.2"
@@ -2221,7 +2221,7 @@ commondir@^1.0.1:
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==
-compressible@~2.0.16:
+compressible@~2.0.18:
version "2.0.18"
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba"
integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==
@@ -2229,16 +2229,16 @@ compressible@~2.0.16:
mime-db ">= 1.43.0 < 2"
compression@^1.7.1:
- version "1.7.4"
- resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f"
- integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.5.tgz#fdd256c0a642e39e314c478f6c2cd654edd74c93"
+ integrity sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q==
dependencies:
- accepts "~1.3.5"
- bytes "3.0.0"
- compressible "~2.0.16"
+ bytes "3.1.2"
+ compressible "~2.0.18"
debug "2.6.9"
+ negotiator "~0.6.4"
on-headers "~1.0.2"
- safe-buffer "5.1.2"
+ safe-buffer "5.2.1"
vary "~1.1.2"
concat-map@0.0.1:
@@ -2262,11 +2262,11 @@ convert-source-map@^2.0.0:
integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
core-js-compat@^3.38.0, core-js-compat@^3.38.1:
- version "3.38.1"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09"
- integrity sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==
+ version "3.39.0"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.39.0.tgz#b12dccb495f2601dc860bdbe7b4e3ffa8ba63f61"
+ integrity sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==
dependencies:
- browserslist "^4.23.3"
+ browserslist "^4.24.2"
core-util-is@~1.0.0:
version "1.0.3"
@@ -2369,9 +2369,9 @@ ee-first@1.1.1:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
electron-to-chromium@^1.5.41:
- version "1.5.49"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz#9358f514ab6eeed809a8689f4b39ea5114ae729c"
- integrity sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==
+ version "1.5.51"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.51.tgz#bb99216fed4892d131a8585a8593b00739310163"
+ integrity sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==
emoji-regex@^8.0.0:
version "8.0.0"
@@ -3526,6 +3526,11 @@ negotiator@0.6.3:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
+negotiator@~0.6.4:
+ version "0.6.4"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7"
+ integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==
+
neo-async@^2.5.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
@@ -3897,10 +3902,10 @@ react-is@^18.0.0:
version "0.0.0"
uid ""
-react-native-safe-area-context@4.12.0:
- version "4.12.0"
- resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.12.0.tgz#17868522a55bbc6757418c94a1b4abdda6b045d9"
- integrity sha512-ukk5PxcF4p3yu6qMZcmeiZgowhb5AsKRnil54YFUUAXVIS7PJcMHGGC+q44fCiBg44/1AJk5njGMez1m9H0BVQ==
+react-native-safe-area-context@4.14.0:
+ version "4.14.0"
+ resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.14.0.tgz#138f4b2e180cb7517c78bd5f4d4cf91325ba0b1a"
+ integrity sha512-/SyYpCulWQOnnXhRq6wepkhoyQMowHm1ptDyRz20s+YS/R9mbd+mK+jFyFCyXFJn8jp7vFl43VUCgspuOiEbwA==
react-native-screens@3.35.0:
version "3.35.0"
@@ -4129,16 +4134,16 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"
-safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
- version "5.1.2"
- resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
- integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
-
-safe-buffer@~5.2.0:
+safe-buffer@5.2.1, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
scheduler@0.24.0-canary-efb381bbf-20230505:
version "0.24.0-canary-efb381bbf-20230505"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.24.0-canary-efb381bbf-20230505.tgz#5dddc60e29f91cd7f8b983d7ce4a99c2202d178f"
@@ -4456,9 +4461,9 @@ tr46@~0.0.3:
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
tslib@^2.0.1:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b"
- integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==
+ version "2.8.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
+ integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
type-detect@4.0.8:
version "4.0.8"
diff --git a/package.json b/package.json
index 1e0beb9..55452dd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-edge-to-edge",
- "version": "1.0.1",
+ "version": "1.1.0",
"license": "MIT",
"description": "Effortlessly enable edge-to-edge display in React Native",
"author": "Mathieu Acthernoene ",
diff --git a/src/expo.ts b/src/expo.ts
index 05e368d..c04fa4e 100644
--- a/src/expo.ts
+++ b/src/expo.ts
@@ -4,7 +4,18 @@ import {
withAndroidStyles,
} from "@expo/config-plugins";
-const withAndroidEdgeToEdgeTheme: ConfigPlugin = (config) => {
+type Theme = "Material2" | "Material3";
+
+type Props = {
+ android?: { parentTheme?: Theme };
+};
+
+const withAndroidEdgeToEdgeTheme: ConfigPlugin = (config, props) => {
+ const themes: Record = {
+ Material2: "Theme.EdgeToEdge.Material2",
+ Material3: "Theme.EdgeToEdge.Material3",
+ } satisfies Record;
+
const ignoreList = new Set([
"android:enforceNavigationBarContrast",
"android:enforceStatusBarContrast",
@@ -22,11 +33,13 @@ const withAndroidEdgeToEdgeTheme: ConfigPlugin = (config) => {
return withAndroidStyles(config, (config) => {
const { androidStatusBar = {}, userInterfaceStyle = "light" } = config;
const { barStyle } = androidStatusBar;
+ const { android = {} } = props;
+ const { parentTheme = "Default" } = android;
config.modResults.resources.style = config.modResults.resources.style?.map(
(style): typeof style => {
if (style.$.name === "AppTheme") {
- style.$.parent = "Theme.EdgeToEdge";
+ style.$.parent = themes[parentTheme] ?? "Theme.EdgeToEdge";
if (style.item != null) {
style.item = style.item.filter(
diff --git a/yarn.lock b/yarn.lock
index f7188fd..4e18dda 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1558,9 +1558,9 @@
"@types/node" "*"
"@types/node@*":
- version "22.8.4"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-22.8.4.tgz#ab754f7ac52e1fe74174f761c5b03acaf06da0dc"
- integrity sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==
+ version "22.9.0"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365"
+ integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==
dependencies:
undici-types "~6.19.8"
@@ -1871,7 +1871,7 @@ braces@^3.0.3:
dependencies:
fill-range "^7.1.1"
-browserslist@^4.20.4, browserslist@^4.23.3, browserslist@^4.24.0:
+browserslist@^4.20.4, browserslist@^4.24.0, browserslist@^4.24.2:
version "4.24.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580"
integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==
@@ -1928,9 +1928,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001669:
- version "1.0.30001675"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001675.tgz#0c1f01fc9cc543b61839753a4c234f995588d1b9"
- integrity sha512-/wV1bQwPrkLiQMjaJF5yUMVM/VdRPOCU8QZ+PmG6uW6DvYSrNY1bpwHI/3mOcUosLaJCzYDi5o91IQB51ft6cg==
+ version "1.0.30001677"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz#27c2e2c637e007cfa864a16f7dfe7cde66b38b5f"
+ integrity sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==
chalk@^2.4.2:
version "2.4.2"
@@ -2064,11 +2064,11 @@ convert-source-map@^2.0.0:
integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
core-js-compat@^3.38.0, core-js-compat@^3.38.1:
- version "3.38.1"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09"
- integrity sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==
+ version "3.39.0"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.39.0.tgz#b12dccb495f2601dc860bdbe7b4e3ffa8ba63f61"
+ integrity sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==
dependencies:
- browserslist "^4.23.3"
+ browserslist "^4.24.2"
core-util-is@~1.0.0:
version "1.0.3"
@@ -2170,9 +2170,9 @@ ee-first@1.1.1:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
electron-to-chromium@^1.5.41:
- version "1.5.49"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.49.tgz#9358f514ab6eeed809a8689f4b39ea5114ae729c"
- integrity sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==
+ version "1.5.51"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.51.tgz#bb99216fed4892d131a8585a8593b00739310163"
+ integrity sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==
emoji-regex@^8.0.0:
version "8.0.0"
@@ -4459,9 +4459,9 @@ tr46@~0.0.3:
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
tslib@^2.0.1:
- version "2.8.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b"
- integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==
+ version "2.8.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
+ integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
type-detect@4.0.8:
version "4.0.8"