From f6d0f9deaccdc53114d47b8a69c49fda7cb1f8e1 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 12 Aug 2021 12:04:39 -0700 Subject: [PATCH] Fix BorderExample for DynamicColorIOS Summary: Changelog: [Internal] - Fix border example for RNTester Reviewed By: charlesbdudley Differential Revision: D30262957 fbshipit-source-id: 677e7a9346bc2f1dc67ec7cc9ad7e36af34ffa60 --- .../rn-tester/js/examples/Border/BorderExample.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/rn-tester/js/examples/Border/BorderExample.js b/packages/rn-tester/js/examples/Border/BorderExample.js index c326752a203..1c256df9aba 100644 --- a/packages/rn-tester/js/examples/Border/BorderExample.js +++ b/packages/rn-tester/js/examples/Border/BorderExample.js @@ -14,6 +14,7 @@ const { StyleSheet, View, PlatformColor, + Platform, DynamicColorIOS, } = require('react-native'); @@ -182,11 +183,17 @@ const styles = StyleSheet.create({ }, border15: { borderWidth: 10, - borderColor: PlatformColor('systemGray4', 'holo_orange_dark'), + borderColor: PlatformColor( + 'systemGray4', + '@android:color/holo_orange_dark', + ), }, border16: { borderWidth: 10, - borderColor: DynamicColorIOS({light: 'magenta', dark: 'cyan'}), + borderColor: + Platform.OS === 'ios' + ? DynamicColorIOS({light: 'magenta', dark: 'cyan'}) + : 'black', }, });