
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-native-animated-icons
Advanced tools
The simplest icon component for React Native.
(I Need to do some clean up on this readme but it works, give it a try!)
All your vector icon needs in one place
A light wrapper around react-native-vector-icons
Import in to your project
import Icon from "react-native-animated-icons"
this will not trigger animation. for that keep reading.
<Icon
name="ios-star"
fontFamily="Ionicons"
size={30}/>
This dummy component monitors changes in props How to trigger animation
name={o.isActive?"heart":"heart-outline"}
or if you dont what to change your icon use
name={"heart"} isActive={o.isActive}
pass prop color
color="rgba(0,0,0,0.5)"
or interpolate a change
let red="rgba(245,60,60,0.8)"
let light="rgba(255,255,255,0.5)"
...
colorInputRange={[0, 0.56, 1]}
colorOutputRange={[
light,
"pink",
o.isActive?red:light,
]}
Parameters | Default | Description |
---|---|---|
animateAllActive | ||
name | ||
isActive | ||
fontSize | 40 | fontSize |
color | rgba(0,0,0,0.5) | color |
iconFamily | MaterialCommunityIcons | iconFamily. optoins:Entypo , EvilIcons , FontAwesome , Foundation , Ionicons , MaterialIcons , MaterialCommunityIcons , Octicons , Zocial , SimpleLineIcons |
animation | {toValue: 1,duration: 500} | animation |
scaleInputRange | [0, 0.6, 1] | |
scaleOutputRange | [1, 1.5, 1] |
this.state = {
hearts:[{isActive:false,"id":1},{isActive:false,"id":2},{isActive:false,"id":3},{isActive:false,"id":4}],
tweets:[{isActive:false,"id":1},{isActive:false,"id":2},{isActive:false,"id":3},{isActive:false,"id":4}]
};
....
onPressHearts = (item) => {
// console.log(" onPress:item ",item);
if(!item)return
// item.isActive!=item.isActive
let {hearts} = this.state
let updatedlist=hearts.map(o => o.id === item.id
?{ ...o, isActive: o.isActive?false:true}
:o)
this.setState({
triggerAnimationId:hearts.find(x => x.id === item.id).id,
hearts: updatedlist})
}
.....
let red="rgba(245,60,60,0.8)"
let light="rgba(255,255,255,0.5)"
<View style={{marginBottom:100,alignItems: "center",justifyContent: "center",height:50,flexDirection:"column", }}>
<Text style={{textAlignVertical: "center", textAlign: "center",fontSize:20 ,margin:10}}>
Animate on Icon Name Change
</Text>
<View style={{height:70,alignItems: "center",justifyContent: "center",flexDirection:"row",}}>
{hearts.map((o,i) => {
return (<TouchableOpacity style={{height:50,}} key={i} onPress={()=>this.onPressHearts(o)}>
<Icon
item={o}
name={o.isActive?"heart":"heart-outline"}
// name={"heart"}
isActive={o.isActive}
colorOutputRange={[
light,
"pink",
o.isActive?red:light,
]}
// animateAllActive
colorInputRange={[0, 0.56, 1]}
/>
</TouchableOpacity>)
})}
</View>
</View>
FAQs
All your vector icon needs in one place
The npm package react-native-animated-icons receives a total of 3 weekly downloads. As such, react-native-animated-icons popularity was classified as not popular.
We found that react-native-animated-icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.