react-native-macos/React/Views
Danilo Bürger c974cbff04 Allow PlatformColor to work with RCTView border colors (#29728)
Summary:
# See PR
https://github.com/facebook/react-native/pull/29728

# From PR Author
Using `PlatformColor` with border colors doesn't work currently when switching dark mode as the information is lost when converting to `CGColor`. This change keeps the border colors around as `UIColor` so switching to dark mode works.

```ts
<View
  style={{
    borderColor: DynamicColorIOS({ dark: "yellow", light: "red" }),
    borderWidth: 1,
  }}
>
...
</View>
```
This view will start with a red border (assuming light mode when started), but will not change to a yellow border when switching to dark mode. With this PR, the border color will be correctly set to yellow.

## Changelog

[iOS] [Fixed] - Allow PlatformColor to work with border colors

Pull Request resolved: https://github.com/facebook/react-native/pull/29728

Test Plan:
1. Assign a `PlatformColor` or `DynamicColorIOS` to a view border color.
2. Toggle between dark / light mode. See the colors change.

Reviewed By: lunaleaps

Differential Revision: D29268376

Pulled By: p-sun

fbshipit-source-id: 586545b05be0beb0e6e5ace6e3f74b304620ad94
2021-06-23 13:37:22 -07:00
..
RefreshControl Daily `arc lint --take CLANGFORMAT` 2021-03-12 04:00:19 -08:00
SafeAreaView Clang format for all React Native files 2020-03-08 23:01:17 -07:00
ScrollView Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTActivityIndicatorView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTActivityIndicatorView.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTActivityIndicatorViewManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTActivityIndicatorViewManager.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTAnimationType.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTAutoInsetsProtocol.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTBorderDrawing.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTBorderDrawing.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTBorderStyle.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTComponent.h iOS: attach rootTag to the native component instance for easy access 2019-11-16 00:13:48 -08:00
RCTComponentData.h Pass RCTEventDispatcher to RCTComponentData [6/n] 2021-03-31 16:39:02 -07:00
RCTComponentData.m Pass RCTEventDispatcher to RCTComponentData [6/n] 2021-03-31 16:39:02 -07:00
RCTConvert+CoreLocation.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert+CoreLocation.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTConvert+Transform.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert+Transform.m Fix skewX/skewY/perspective/matrix on iOS (#28863) 2020-05-11 09:01:33 -07:00
RCTDatePicker.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTDatePicker.m Daily `arc lint --take CLANGFORMAT` 2020-09-29 04:14:33 -07:00
RCTDatePickerManager.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTDatePickerManager.m Fix DatePicker sizing issue 2021-04-28 13:48:28 -07:00
RCTFont.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTFont.mm Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTLayout.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTLayout.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTMaskedView.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMaskedView.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMaskedViewManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTMaskedViewManager.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTModalHostView.h iOS: 5/7 Use visible prop to dismiss Modal for Paper 2021-05-02 15:42:49 -07:00
RCTModalHostView.m iOS: 5/7 Use visible prop to dismiss Modal for Paper 2021-05-02 15:42:49 -07:00
RCTModalHostViewController.h remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
RCTModalHostViewController.m remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
RCTModalHostViewManager.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTModalHostViewManager.m iOS: 5/7 Use visible prop to dismiss Modal for Paper 2021-05-02 15:42:49 -07:00
RCTModalManager.h iOS: 2/5 Remove use of bridge from Modal by dismissing with visible prop 2021-05-02 15:42:49 -07:00
RCTModalManager.m iOS: 2/5 Remove use of bridge from Modal by dismissing with visible prop 2021-05-02 15:42:49 -07:00
RCTPicker.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTPicker.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTPickerManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTPickerManager.m Remove code supporting legacy paper interop from Picker view manager 2021-03-23 10:59:32 -07:00
RCTPointerEvents.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTProgressViewManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTProgressViewManager.m remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
RCTRootShadowView.h Add minimumSize to RCTRootView & RCTRootShadowView 2020-04-08 12:48:07 -07:00
RCTRootShadowView.m Add minimumSize to RCTRootView & RCTRootShadowView 2020-04-08 12:48:07 -07:00
RCTSegmentedControl.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTSegmentedControl.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTSegmentedControlManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTSegmentedControlManager.m feat: add custom color for iOS13 segmented control (#27643) 2020-01-06 22:19:37 -08:00
RCTShadowView+Internal.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTShadowView+Internal.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTShadowView+Layout.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTShadowView+Layout.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTShadowView.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTShadowView.m Apply clang-format update fixes 2021-01-09 22:11:00 -08:00
RCTSlider.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTSlider.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTSliderManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTSliderManager.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTSwitch.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTSwitch.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTSwitchManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTSwitchManager.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTTextDecorationLineType.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTView.h Allow PlatformColor to work with RCTView border colors (#29728) 2021-06-23 13:37:22 -07:00
RCTView.m Allow PlatformColor to work with RCTView border colors (#29728) 2021-06-23 13:37:22 -07:00
RCTViewManager.h Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTViewManager.m Allow PlatformColor to work with RCTView border colors (#29728) 2021-06-23 13:37:22 -07:00
RCTWeakViewHolder.h Introducing RCTWeakViewHolder [4/n] 2021-03-31 16:39:02 -07:00
RCTWrapperViewController.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTWrapperViewController.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
UIView+Private.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
UIView+React.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
UIView+React.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00