mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-22 15:15:12 +00:00
PR removing extractColor.ts in favor of using the processColor implementation straight from react-native. It should handle all the cases from the previous implementation and the cases with PlatformColor and DynamicColorIOS. Normally we would just send the returned value to the native side, but in react-native-svg, e.g. fill prop can have more values than just color, e.g. currentColor. Because of it, we cannot use UIColor on iOS, NSColor on macOS and customType="Color" on Android as a prop type there and therefore we need to prepare the custom values on the JS side. It is done by passing the prop as an array with specific first element. In case of colors, it is 0. (hopefully I understood the code right).
9 lines
202 B
JavaScript
9 lines
202 B
JavaScript
/* eslint-disable no-unused-vars */
|
|
import React from 'react';
|
|
import ColorTest from './src/ColorTest';
|
|
import Test1718 from './src/Test1718';
|
|
|
|
export default function App() {
|
|
return <ColorTest />;
|
|
}
|