{"_id":"@berndschrooten/react-native-svg-uri","_rev":"5-238e3b431e2c73bb7ce1aefa3999ce41","name":"@berndschrooten/react-native-svg-uri","description":"Render an SVG Image from an URL","dist-tags":{"latest":"1.1.3"},"versions":{"1.1.3":{"name":"@berndschrooten/react-native-svg-uri","version":"1.1.3","description":"Render an SVG Image from an URL","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --compilers js:babel-core/register"},"repository":{"type":"git","url":"git+https://github.com/BerndSchrooten/react-native-svg-uri.git"},"keywords":["react-native","svg","url","uri","http"],"author":{"name":"Matias Cortes"},"license":"ISC","dependencies":{"xmldom":"^0.1.22"},"peerDependencies":{"react-native-svg":"^5.3.0"},"bugs":{"url":"https://github.com/BerndSchrooten/react-native-svg-uri/issues"},"homepage":"https://github.com/BerndSchrooten/react-native-svg-uri#readme","devDependencies":{"babel-core":"^6.24.1","babel-preset-react-native":"^2.1.0","chai":"^3.5.0","mocha":"^3.2.0"},"gitHead":"e6458b73d3971e16f6922d24eec9a59857f45889","_id":"@berndschrooten/react-native-svg-uri@1.1.3","_npmVersion":"5.3.0","_nodeVersion":"7.6.0","_npmUser":{"name":"berndschrooten","email":"schrootenbernd@gmail.com"},"dist":{"integrity":"sha512-r+DjlxRqRgGAkJvACOBHHfEpv4vzR74MbOo4MqYphLOkygAvt80phkdPPSDqemgXjdLwnsXR+eJDTrotmm5w2w==","shasum":"05c59b57ffe43f1c7d3dc45993efe60e0ca3f11c","tarball":"https://registry.npmjs.org/@berndschrooten/react-native-svg-uri/-/react-native-svg-uri-1.1.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIApKARHlZRb7Q71ITEpsj/11GuECujabsR2UAjv7nF5yAiEAsActUQqeaNbP5rkEw1xcHYuTKCdNl4kZrbgV0Tn/zl0="}]},"maintainers":[{"name":"berndschrooten","email":"schrootenbernd@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-svg-uri-1.1.3.tgz_1502096627126_0.35814670636318624"}}},"readme":"# react-native-svg-uri\nRender SVG images in React Native from an URL or a static file\n\nThis was tested with RN 0.33 and react-native-svg 4.3.1 (depends on this library)\n[react-native-svg](https://github.com/react-native-community/react-native-svg)\n\n\nNot all the svgs can be rendered, if you find problems fill an issue or a PR in\norder to contemplate all the cases\n\nInstall library from `npm`\n\n```bash\nnpm install @berndschrooten/react-native-svg-uri --save\n```\n\nLink library react-native-svg\n\n```bash\nreact-native link react-native-svg # not react-native-svg-uri !!!\n```\n\n## Props\n\n| Prop | Type | Default | Note |\n|---|---|---|---|\n| `source` | `ImageSource` |  | Same kind of `source` prop that `<Image />` component has\n| `svgXmlData` | `String` |  | You can pass the SVG as String directly\n| `fill` | `Color` |  | Overrides all fill attributes of the svg file\n| `classes` | `Object` |  | Overrides attributes of classes, only those attributes present in the given object\n\n## Known Bugs\n\n- [ANDROID] There is a problem with static SVG file on Android,\n  Works OK in debug mode but fails to load the file in release mode.\n  At the moment the only workaround is to pass the svg content in the svgXmlData prop.\n\n## <a name=\"Usage\">Usage</a>\n\nHere's a simple example:\n\n```javascript\nimport SvgUri from 'react-native-svg-uri';\n\nconst TestSvgUri = () => (\n  <View style={styles.container}>\n    <SvgUri\n      width=\"200\"\n      height=\"200\"\n      source={{uri:'http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg'}}\n      classes={{'cls-1': {strokeWidth: 5}}}\n    />\n  </View>\n);\n```\n\nor a static file\n\n```javascript\n<SvgUri width=\"200\" height=\"200\" source={require('./img/homer.svg')} />\n```\n\nThis will render:\n\n![Component example](./screenshoots/sample.png)\n\n## Testing\n1. Make sure you have installed dependencies with `npm i`\n2. Run tests with `npm test`\n","maintainers":[{"name":"berndschrooten","email":"schrootenbernd@gmail.com"}],"time":{"modified":"2022-04-04T18:31:56.117Z","created":"2017-08-07T09:03:48.129Z","1.1.3":"2017-08-07T09:03:48.129Z","1.2.1":"2017-08-08T19:00:34.413Z","1.2.2":"2017-08-09T07:51:24.579Z"},"homepage":"https://github.com/BerndSchrooten/react-native-svg-uri#readme","keywords":["react-native","svg","url","uri","http"],"repository":{"type":"git","url":"git+https://github.com/BerndSchrooten/react-native-svg-uri.git"},"author":{"name":"Matias Cortes"},"bugs":{"url":"https://github.com/BerndSchrooten/react-native-svg-uri/issues"},"license":"ISC","readmeFilename":"README.md"}