Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-overflow-menu
Advanced tools
React component for overflow menu styled in bootstrap
<!-- Put bootstrap cdn link (like below) in index.html of your React App -->
<!-- Latest compiled and minified CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
crossorigin="anonymous"
/>
import React, { Component } from 'react';
import OverflowMenu from 'react-overflow-menu';
// Mention your own menu items (only 'id' and 'text' are supported)
const menuItems = [
{ id: 'edit', text: 'Edit' },
{ id: 'delete', text: 'Delete' }
];
class App extends Component {
menuItemClick = e => console.log('App', e.target.id); // Write your own logic
render() {
return (
<div>
OverflowMenu
<br />
<div className="container">
<table style={{ width: '50%' }}>
<tr>
<td>Demo</td>
</tr>
<tr>
<td>
<OverflowMenu
className="text-right"
menuItems={menuItems}
menuItemClick={this.menuItemClick}
/>
</td>
</tr>
</table>
</div>
</div>
);
}
}
export default App;
npm install react-overflow-menu
className
Sets the class name (bootstrap class) of the overflow menu. Defaults to text-right
. Valid values are:
text-left | text-center | text-right
:: Alignment of the overflow menu
menuItems
An array of object with properties like 'id' and 'text'.
const menuItems = [
{ id: 'edit', text: 'Edit' },
{ id: 'delete', text: 'Delete' }
];
menuItemClick
A callback function to get event object of a button of a menu item.
MIT
FAQs
React component for overflow menu styled in bootstrap
We found that react-overflow-menu 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.