Socket
Socket
Sign inDemoInstall

react-native-svg-animated-linear-gradient

Package Overview
Dependencies
7
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.3 to 0.3.4

2

package.json
{
"name": "react-native-svg-animated-linear-gradient",
"version": "0.3.3",
"version": "0.3.4",
"description": "Animated linear gradient for React Native Svg",

@@ -5,0 +5,0 @@ "repository": {

@@ -80,2 +80,3 @@ ## SVG Animated Linear Gradient [iOS + Android]

| secondaryColor | String | '#dddddd' | Secondary color |
| duration | Number | 2000 | Animation duration in milliseconds |
| width | Number | 300 | Width of SVG |

@@ -82,0 +83,0 @@ | height | Number | 200 | Height of SVG |

@@ -23,6 +23,8 @@ import React, {Component} from 'react';

const initialOffsetValues = props.offset
? [1, 1 + props.offset / 2, 1 + props.offset]
: [1, 1.5, 2];
this.state = {
offsetValues: [
'-2', '-1.5', '-1'
],
initialOffsetValues,
offsetValues: [...initialOffsetValues].reverse().map(v => String(v * -1)),
offsets: [

@@ -59,3 +61,3 @@ '0.0001', '0.0002', '0.0003' // Avoid duplicate value cause error in Android

let interpolator = interpolate(this.state, {
offsetValues: ['1', '1.5', '2']
offsetValues: this.state.initialOffsetValues.map(v => String(v))
});

@@ -161,4 +163,4 @@

x2: '100%',
y2: '0'
y2: '0',
offset: 1,
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc