Skip to content

Commit

Permalink
feat: [IAI-17] Render local svg files (#3158)
Browse files Browse the repository at this point in the history
* initial setup

* add svgrrc settings

* wip

* add samples

* add test mock

* remove webpack

* fix

* fix path
  • Loading branch information
fabriziofff authored Jun 21, 2021
1 parent 4ef3e8c commit b895c92
Show file tree
Hide file tree
Showing 13 changed files with 551 additions and 26 deletions.
6 changes: 6 additions & 0 deletions .svgrrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dimensions": false,
"replaceAttrValues": {
"@fillColor": "{props.fill}"
}
}
5 changes: 5 additions & 0 deletions img/test/alphaChannel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions img/test/analytics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions img/test/faceID.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions img/test/fingerprint.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ PODS:
- React
- RNShare (3.7.0):
- React
- RNSVG (12.1.0):
- RNSVG (12.1.1):
- React
- RNVectorIcons (7.0.0):
- React
Expand Down Expand Up @@ -735,7 +735,7 @@ SPEC CHECKSUMS:
RNScreens: b748efec66e095134c7166ca333b628cd7e6f3e2
RNSha256: ab608b2185fb806185a2cc112e0474065842e085
RNShare: a1d5064df7a0ebe778d001869b3f0a124bf0a491
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
RNVectorIcons: da6fe858f5a65d7bbc3379540a889b0b12aa5976
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: 7740b94929bbacbddda59bf115b5317e9a161598
Expand Down
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module.exports = {
transformIgnorePatterns: [
"node_modules/(?!(jest-)?react-native|react-navigation|@react-navigation|react-navigation-redux-helpers|react-native-device-info|native-base|native-base-shoutem-theme|@shoutem/animation|@shoutem/ui|rn-placeholder|jsbarcode|@pagopa/react-native-cie|react-native-share|jail-monkey|@react-native-community/art|@react-native-community/push-notification-ios|@react-native-community/cameraroll|@codler)"
],
moduleNameMapper: {
"\\.svg": "<rootDir>/ts/__mocks__/svgMock.js"
},
globals: {
"ts-jest": {
babelConfig: true
Expand Down
Loading

0 comments on commit b895c92

Please sign in to comment.