Commit Graph

5 Commits

Author SHA1 Message Date
Wojciech Lewicki
1b01381f28 feat: remove extractColor in favor of RN impl (#1726)
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).
2022-04-12 13:47:21 +02:00
Sjaak Schilperoort
69e1be7bbc Add support for setting an onError prop on SvgCssUri (#1718)
In PR #1266, support was added for setting an onError property on SvgUri. This PR adds the same to SvgCssUri.
2022-04-12 11:24:53 +02:00
Mathieu Acthernoene
2fa9645cf6 Add web example (#1717)
Added web example to `Example`
2022-03-07 12:16:50 +01:00
Wojciech Lewicki
b007efe23a fix: PlatformColor crashes on iOS and Android (#1703)
Follow-up PR to https://github.com/react-native-svg/react-native-svg/pull/1561 fixing the problems mentioned there. Also fixing the wrong releasing introduced in 027b8c16aa
2022-02-24 12:53:04 +01:00
Wojciech Lewicki
86813032c9 chore: add example with test cases (#1702)
PR adding TestsExample app which should include test cases for e.g. PRs.
It also removes package-lock.json since yarn is used.
2022-02-23 15:26:18 +01:00