From ac80b9e58fbe2a754df6ebfa17322243b5c33b6e Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Wed, 26 Oct 2022 08:33:17 +0200 Subject: [PATCH] Update react-native-svg to ^13.0.0, allow react-native-svg ^13.0.0 as peerDependency (#837) --- packages/lucide-react-native/README.md | 26 +++++++++++------------ packages/lucide-react-native/package.json | 10 +++++---- pnpm-lock.yaml | 13 ++++++------ 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/packages/lucide-react-native/README.md b/packages/lucide-react-native/README.md index 037d42cbb..9d14de470 100644 --- a/packages/lucide-react-native/README.md +++ b/packages/lucide-react-native/README.md @@ -6,7 +6,7 @@ Implementation of the lucide icon library for React Native applications. ## Installation -First, ensure that you have `react-native-svg@^12.0.0` installed. Then, install the package: +First, ensure that you have`react-native-svg@^12.0.0` or `react-native-svg@^13.0.0` installed. Then, install the package: ```sh yarn add lucide-react-native @@ -25,11 +25,11 @@ Each icon can be imported as a react component. You can pass additional props to adjust the icon. -``` js +```js import { Camera } from 'lucide-react-native'; const App = () => { - return + return ; }; export default App; @@ -37,19 +37,19 @@ export default App; ### Props -| name | type | default -| ------------ | -------- | -------- -| `size` | *Number* | 24 -| `color` | *String* | currentColor -| `strokeWidth`| *Number* | 2 +| name | type | default | +| ------------- | -------- | ------------ | +| `size` | _Number_ | 24 | +| `color` | _String_ | currentColor | +| `strokeWidth` | _Number_ | 2 | ### Custom props You can also pass custom props that will be added in the svg as attributes. -``` js +```js const App = () => { - return + return ; }; ``` @@ -59,13 +59,13 @@ It is possible to create a generic icon component to load icons. > :warning: The example below is importing all ES modules. This is **not** recommended when you using a bundler since your application build size will grow substantially. -``` js +```js import * as icons from 'lucide-react-native'; -const Icon = ({name, color, size}) => { +const Icon = ({ name, color, size }) => { const LucideIcon = icons[name]; - return + return ; }; export default Icon; diff --git a/packages/lucide-react-native/package.json b/packages/lucide-react-native/package.json index f258481af..45e8d81db 100644 --- a/packages/lucide-react-native/package.json +++ b/packages/lucide-react-native/package.json @@ -19,7 +19,9 @@ "typings": "dist/lucide-react-native.d.ts", "react-native": "dist/esm/lucide-react-native.js", "sideEffects": false, - "files": ["dist"], + "files": [ + "dist" + ], "scripts": { "build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:bundles && pnpm build:types", "copy:license": "cp ../../LICENSE ./LICENSE", @@ -38,12 +40,12 @@ "react": "^18.0.0", "react-dom": "^18.0.0", "react-native": "^0.69.0", - "react-native-svg": "^12.0.0" + "react-native-svg": "^13.0.0" }, "peerDependencies": { "prop-types": "^15.7.2", "react": "^16.5.1 || ^17.0.0 || ^18.0.0", - "react-native": ">=0.50.0", - "react-native-svg": "^12.0.0" + "react-native": "*", + "react-native-svg": "^12.0.0 || ^13.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c07cad2e9..da40c1f0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -200,7 +200,7 @@ importers: react: ^18.0.0 react-dom: ^18.0.0 react-native: ^0.69.0 - react-native-svg: ^12.0.0 + react-native-svg: ^13.0.0 devDependencies: '@testing-library/react': 11.2.7_zpnidt7m3osuk7shl3s4oenomq babel-preset-react-app: 10.0.1 @@ -209,7 +209,7 @@ importers: react: 18.0.0 react-dom: 18.0.0_react@18.0.0 react-native: 0.69.3_zfzkngtuypffuickx4fuv5ptvi - react-native-svg: 12.4.3_w3kncuvwqnzhwf3ziybn5l7dja + react-native-svg: 13.4.0_w3kncuvwqnzhwf3ziybn5l7dja packages/lucide-solid: specifiers: @@ -11334,7 +11334,7 @@ packages: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 - entities: 4.3.1 + entities: 4.4.0 dev: true /dom-walk/0.1.2: @@ -11540,6 +11540,7 @@ packages: /entities/4.3.1: resolution: {integrity: sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==} engines: {node: '>=0.12'} + dev: false /entities/4.4.0: resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} @@ -19393,11 +19394,11 @@ packages: resolution: {integrity: sha512-+4JpbIx42zGTONhBTIXSyfyHICHC29VTvhkkoUOJAh/XHPEixpuBduYgf6Y4y9wsN1ARlQhBBoptTvXvAFQf5g==} dev: true - /react-native-svg/12.4.3_w3kncuvwqnzhwf3ziybn5l7dja: - resolution: {integrity: sha512-8OF+vvXsI854YlHBOQkanNcyio+7oQO0nQsS/Noji2VmPoMnLiJiMaxmOD9RHxGkbbo7lzbYWdxVdNibjN/8IA==} + /react-native-svg/13.4.0_w3kncuvwqnzhwf3ziybn5l7dja: + resolution: {integrity: sha512-B3TwK+H0+JuRhYPzF21AgqMt4fjhCwDZ9QUtwNstT5XcslJBXC0FoTkdZo8IEb1Sv4suSqhZwlAY6lwOv3tHag==} peerDependencies: react: '*' - react-native: '>=0.50.0' + react-native: '*' dependencies: css-select: 5.1.0 css-tree: 1.1.3