Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
react-mask-layer
Advanced tools
Animatable mask layer, to hold anything you want.
import MaskLayer from 'react-mask-layer';
import 'react-mask-layer/assets/index.css';
class App extends Component {
constructor(props) {
super(props);
// initial state
this.state = {
maskerVisible: false,
};
}
_maskCancel = e => {
console.log('cancel target: ', e.target, ' type: ', e.type);
this.setState({ maskerVisible: false });
};
_showOverlay = e => {
console.log('show target: ', e.target, ' type: ', e.type);
e.preventDefault();
this.setState({ maskerVisible: true });
};
render() {
return (
<div className="App">
<div onClick={this._showOverlay}>show mask layer</div>
<MaskLayer visible={this.state.maskerVisible} onCancel={this._maskCancel} />
</div>
);
}
}
Name | Type | Default | Description |
---|---|---|---|
prefixCls | String | mx-mask | The mask layer dom node's prefixCls |
className | String | additional className for mask layer | |
wrapClassName | String | additional className for mask layer wrap | |
style | Object | {} | Root style for mask layer element.Such as width, height |
zIndex | Number | ||
bodyStyle | Object | {} | body style for mask layer body element.Such as height |
maskStyle | Object | {} | style for mask element |
visible | Boolean | false | current mask layer's visible status |
animation | String | part of mask layer animation css class name | |
maskAnimation | String | part of mask layer's mask animation css class name | |
transitionName | String | mask layer animation css class name | |
maskTransitionName | String | mask animation css class name | |
maskClosable | Boolean | true | whether click mask to close |
keyboard | Boolean | true | whether support press esc to close |
mousePosition | {x:number,y:number} | set pageX and pageY of current mouse(it will cause transform origin to be set) | |
onClose | function() | called when click mask |
react-mask-layer
is available under the MIT license. See the LICENSE file for more info.
FAQs
Animatable mask layer, to hold anything you want.
The npm package react-mask-layer receives a total of 7 weekly downloads. As such, react-mask-layer popularity was classified as not popular.
We found that react-mask-layer 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.