
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
react-lava-lamp-menu
Advanced tools
A menu component with a lava lamp effect when selecting a menu option.
https://jbccollins.github.io/react-lava-lamp-menu/
npm install --save react-lava-lamp-menu
import React, { Component } from 'react'
import LavaLampMenu from 'react-lava-lamp-menu'
class Example extends Component {
state = {
selectedItemId: "item1"
}
handleSelectedItemChange = id => {
this.setState({selectedItemId: id});
}
render () {
return (
<LavaLampMenu
itemStyle={{color:'red'}}
mouseOverItemStyle={{color: 'black'}}
selectedItemStyle={{backgroundColor: 'black', color: 'red'}}
sliderStyle={{backgroundColor: 'black'}}}
onSelectedItemChange={this.handleSelectedItemChange}
items={[
name: 'Menu Item 1', id: "item1",
name: 'Menu Item 2', id: "item2",
name: 'Menu Item 3', id: "item3",
]}
selectedItemId={this.state.selectedItemId}/>
)
}
}
| prop | description |
|---|---|
| items | List of menu items |
| itemStyle | Inline style for all items |
| mouseOverItemStyle | Inline style for the item that is currently being moused over. Will override any conflicting styles from itemStyle |
| selectedItemStyle | Inline style for the item that is currently selected. Will override any conflicting styles from itemStyle and mouseOverItemStyle |
| onSelectedItemChange | Receives the selected item id on click |
| selectedItemId | The id of the item that is currently selected |
From the top level directory run
yarn start
In a separate terminal window, from the example directory run
yarn start
MIT © jbccollins
FAQs
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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.