Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
react-mobile-drawer
Advanced tools
Simple react drawer component with touch events support
Example: https://ilyacuc.github.io/react-mobile-drawer/
Usage
import React from "react";
import ReactDOM from "react-dom";
import Drawer from 'react-mobile-drawer';
class App extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
isOpen: false
}
}
closeDrawer = () => {
this.setState({isOpen: false});
}
openDrawer = () => {
this.setState({isOpen: true});
}
render() {
return (
<div>
<Drawer isOpen={this.state.isOpen} closeDrawer={this.closeDrawer} openDrawer={this.openDrawer}>
<div>Menu content here</div>
</Drawer>
<button onClick={this.openDrawer}>Open Drawer</button>
<div>Main content here</div>
</div>
);
}
}
ReactDOM.render(<App/>, document.getElementById("app"));
Props
Prop Name | Default Value | Description |
---|---|---|
isOpen | false | controls state of drawer |
backdropClassName | empty string | class name to style backdrop |
drawerClassName | empty string | class name to style drawer container |
width | 80 | drawer width in % |
sideZoneWidth | 30 | width of side drawing zone in px |
closeDrawer | empty function | function to control state of drawer |
openDrawer | empty function | function to control state of drawer |
FAQs
Simple react drawer component with touch events support
We found that react-mobile-drawer 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.