Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-focus-trap

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-focus-trap - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

package.json
{
"name": "react-focus-trap",
"version": "1.1.0",
"version": "1.2.0",
"description": "Traps focus for accessible dropdowns and modal content.",

@@ -5,0 +5,0 @@ "main": "src/FocusTrap.js",

@@ -29,2 +29,3 @@ var Backdrop = require('./Backdrop');

var role = _props.role;
var style = _props.style;

@@ -39,3 +40,3 @@ if (!active) return null;

FocalPoint,
{ ref: 'focus', className: className, element: element },
{ ref: 'focus', className: className, element: element, style: style },
children

@@ -54,2 +55,2 @@ )

module.exports = FocusTrap;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Gb2N1c1RyYXAuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLElBQUksUUFBUSxHQUFLLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQTtBQUN0QyxJQUFJLFVBQVUsR0FBRyxPQUFPLENBQUMsY0FBYyxDQUFDLENBQUE7QUFDeEMsSUFBSSxLQUFLLEdBQVEsT0FBTyxDQUFDLE9BQU8sQ0FBQyxDQUFBOztBQUVqQyxJQUFJLFNBQVMsR0FBRyxLQUFLLENBQUMsV0FBVyxDQUFDOzs7QUFFaEMsV0FBUyxFQUFFO0FBQ1QsVUFBTSxFQUFHLEtBQUssQ0FBQyxTQUFTLENBQUMsSUFBSTtBQUM3QixVQUFNLEVBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxJQUFJO0dBQzlCOztBQUVELGlCQUFlLEVBQUEsMkJBQUc7QUFDaEIsV0FBTztBQUNMLFlBQU0sRUFBTSxJQUFJO0FBQ2hCLGVBQVMsRUFBRyxZQUFZO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ICdvbkV4aXQnIGluIHRoaXMucHJvcHMpIHtcbiAgICAgIHRoaXMucHJvcHMub25FeGl0KClcbiAgICB9XG4gIH1cbn0pXG5cbm1vZHVsZS5leHBvcnRzID0gRm9jdXNUcmFwXG4iXX0=
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc