Skip to content

Commit

Permalink
Feat/switch svg to png (#141)
Browse files Browse the repository at this point in the history
* feat: add .png for every icon used in the app

* chore: removed react-native-svg

* chore: reverted basic example change, updated podfile.lock

* remove: react-native-svg from example app

---------

Co-authored-by: Jakub Grzywacz <kontakt@jakubgrzywacz.pl>
  • Loading branch information
mateki0 and jakex7 committed Jun 18, 2023
1 parent bfb10ec commit 8fa5599
Show file tree
Hide file tree
Showing 36 changed files with 42 additions and 367 deletions.
10 changes: 2 additions & 8 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@ PODS:
- RNScreens (3.4.0):
- React-Core
- React-RCTImage
- RNSVG (12.1.1):
- React
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand Down Expand Up @@ -402,7 +400,6 @@ DEPENDENCIES:
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSVG (from `../node_modules/react-native-svg`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -487,15 +484,13 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-reanimated"
RNScreens:
:path: "../node_modules/react-native-screens"
RNSVG:
:path: "../node_modules/react-native-svg"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
DoubleConversion: cde416483dac037923206447da6e1454df403714
FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469
FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb
Flipper: ed161911b24ac3f237ed57febeed5d71d432d9bf
Expand All @@ -508,7 +503,7 @@ SPEC CHECKSUMS:
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
FlipperKit: 57764956d2f0f972c1af5075a9c8f05ca5b12349
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
RCTRequired: 5520387431beaa5f32aa8726bf746cd5353119fe
Expand Down Expand Up @@ -538,7 +533,6 @@ SPEC CHECKSUMS:
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNReanimated: d9da990fc90123f4ffbfdda93d00fc15174863a8
RNScreens: 21b73c94c9117e1110a79ee0ee80c93ccefed8ce
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
3 changes: 1 addition & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.4.0",
"react-native-svg": "^12.1.1"
"react-native-screens": "^3.4.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
Expand Down
81 changes: 1 addition & 80 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1284,11 +1284,6 @@ bindings@^1.5.0:
dependencies:
file-uri-to-path "1.0.0"

boolbase@^1.0.0, boolbase@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=

bplist-creator@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c"
Expand Down Expand Up @@ -1734,29 +1729,6 @@ cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"

css-select@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef"
integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==
dependencies:
boolbase "^1.0.0"
css-what "^3.2.1"
domutils "^1.7.0"
nth-check "^1.0.2"

css-tree@^1.0.0-alpha.39:
version "1.1.3"
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==
dependencies:
mdn-data "2.0.14"
source-map "^0.6.1"

css-what@^3.2.1:
version "3.4.2"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4"
integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==

dayjs@^1.8.15:
version "1.10.5"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.5.tgz#5600df4548fc2453b3f163ebb2abbe965ccfb986"
Expand Down Expand Up @@ -1842,32 +1814,6 @@ destroy@~1.0.4:
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=

dom-serializer@0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51"
integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
dependencies:
domelementtype "^2.0.1"
entities "^2.0.0"

domelementtype@1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==

domelementtype@^2.0.1:
version "2.2.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==

domutils@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==
dependencies:
dom-serializer "0"
domelementtype "1"

ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
Expand Down Expand Up @@ -1907,11 +1853,6 @@ end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"

entities@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==

envinfo@^7.7.2:
version "7.8.1"
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475"
Expand Down Expand Up @@ -2979,11 +2920,6 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"

mdn-data@2.0.14:
version "2.0.14"
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==

merge-options@^3.0.4:
version "3.0.4"
resolved "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz#84709c2aa2a4b24c1981f66c179fe5565cc6dbb7"
Expand Down Expand Up @@ -3478,13 +3414,6 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"

nth-check@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==
dependencies:
boolbase "~1.0.0"

nullthrows@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1"
Expand Down Expand Up @@ -3893,14 +3822,6 @@ react-native-screens@^3.4.0:
dependencies:
warn-once "^0.1.0"

react-native-svg@^12.1.1:
version "12.1.1"
resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-12.1.1.tgz#5f292410b8bcc07bbc52b2da7ceb22caf5bcaaee"
integrity sha512-NIAJ8jCnXGCqGWXkkJ1GTzO4a3Md5at5sagYV8Vh4MXYnL4z5Rh428Wahjhh+LIjx40EE5xM5YtwyJBqOIba2Q==
dependencies:
css-select "^2.1.0"
css-tree "^1.0.0-alpha.39"

react-native@0.63.5:
version "0.63.5"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.5.tgz#2c0d5dca527fb69bb481e89b2c86068f2641b62d"
Expand Down Expand Up @@ -4376,7 +4297,7 @@ source-map@^0.5.0, source-map@^0.5.6:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=

source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
source-map@^0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,14 @@
"react": "16.13.1",
"react-native": "0.63.5",
"react-native-builder-bob": "^0.18.0",
"react-native-svg": "^13.4.0",
"react-test-renderer": "16.13.1",
"release-it": "^14.2.2",
"typescript": "^4.1.3",
"unicode-emoji-json": "^0.3.1"
},
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-native-svg": "^13.4.0"
"react-native": "*"
},
"jest": {
"preset": "react-native",
Expand Down
11 changes: 0 additions & 11 deletions src/assets/Ban.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/assets/Clock.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/assets/Close.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/assets/Flag.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/assets/Football.tsx

This file was deleted.

23 changes: 9 additions & 14 deletions src/assets/Funnel.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import * as React from 'react'
import Svg, { FillProps, Path, Mask, Rect } from 'react-native-svg'

export default ({ fill }: FillProps) => (
<Svg width="12" height="7" viewBox="0 0 12 7" fill="none">
<Mask id="path-1-outside-1_1_34" x="0" y="0" width="12" height="7" fill="black">
<Rect fill={fill} width="12" height="7" />
<Path d="M6 6C6 2 2.66667 1.33333 1 1H11C11 1 6 2 6 6Z" />
</Mask>
<Path d="M6 6C6 2 2.66667 1.33333 1 1H11C11 1 6 2 6 6Z" fill={fill} />
<Path
d="M1 1V0L0.803884 1.98058L1 1ZM5 6C5 6.55228 5.44772 7 6 7C6.55228 7 7 6.55228 7 6H5ZM11 1L11.1961 1.98058L11 0V1ZM0.803884 1.98058C1.65801 2.15141 2.71193 2.37341 3.56269 2.95193C4.33827 3.47932 5 4.34032 5 6H7C7 3.65968 5.99507 2.18735 4.68731 1.29807C3.45474 0.459925 2.00866 0.181927 1.19612 0.0194193L0.803884 1.98058ZM7 6C7 4.49702 7.91512 3.51712 9.0145 2.85749C9.5593 2.53061 10.1128 2.30817 10.535 2.16743C10.7443 2.09765 10.917 2.04942 11.0342 2.01927C11.0927 2.00423 11.1371 1.99378 11.1649 1.98747C11.1788 1.98431 11.1886 1.9822 11.1939 1.98107C11.1965 1.9805 11.1981 1.98019 11.1985 1.98011C11.1987 1.98007 11.1986 1.98009 11.1982 1.98017C11.198 1.98021 11.1977 1.98026 11.1974 1.98033C11.1972 1.98036 11.1969 1.98043 11.1968 1.98044C11.1965 1.98051 11.1961 1.98058 11 1C10.8039 0.0194193 10.8035 0.019497 10.8031 0.0195786C10.8029 0.0196111 10.8025 0.019697 10.8022 0.019762C10.8015 0.0198923 10.8008 0.0200388 10.8 0.0202014C10.7984 0.0205268 10.7965 0.0209171 10.7943 0.0213734C10.7899 0.022286 10.7842 0.0234629 10.7774 0.0249121C10.7638 0.0278102 10.7455 0.0318001 10.7228 0.0369466C10.6774 0.0472352 10.6143 0.0621743 10.5361 0.0822883C10.3799 0.122459 10.1619 0.183603 9.90252 0.270067C9.38724 0.441827 8.6907 0.719392 7.9855 1.14251C6.58488 1.98288 5 3.50298 5 6H7ZM11 0H1V2H11V0Z"
fill={fill}
mask="url(#path-1-outside-1_1_34)"
/>
</Svg>
import { Image } from 'react-native'

type Props = {
fill: string
}

const iconDimensions = { width: 12, height: 10 }
export default ({ fill }: Props) => (
<Image source={require('./funnel.png')} style={[{ tintColor: fill }, iconDimensions]} />
)
11 changes: 0 additions & 11 deletions src/assets/Lightbulb.tsx

This file was deleted.

Loading

0 comments on commit 8fa5599

Please sign in to comment.