Socket
Socket
Sign inDemoInstall

@reach/dialog

Package Overview
Dependencies
28
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.17.0 to 0.18.0-pre.0

CHANGELOG.md

39

package.json
{
"name": "@reach/dialog",
"version": "0.17.0",
"version": "0.18.0-pre.0",
"description": "Accessible React Modal Dialog.",

@@ -16,12 +16,14 @@ "author": "React Training <hello@reacttraining.com>",

"dependencies": {
"@reach/portal": "0.17.0",
"@reach/utils": "0.17.0",
"prop-types": "^15.7.2",
"react-focus-lock": "^2.5.2",
"react-remove-scroll": "^2.4.3",
"tslib": "^2.3.0"
"@reach/portal": "0.18.0-pre.0",
"@reach/utils": "0.18.0-pre.0",
"react-focus-lock": "2.5.2",
"react-remove-scroll": "2.4.3"
},
"devDependencies": {
"@reach-internal/dev": "0.0.0",
"@reach-internal/test": "0.0.0",
"@reach-internal/tsconfig": "0.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"tsup": "^6.1.3"
},

@@ -32,6 +34,7 @@ "peerDependencies": {

},
"main": "dist/reach-dialog.cjs.js",
"module": "dist/reach-dialog.esm.js",
"types": "dist/reach-dialog.cjs.d.ts",
"main": "./dist/index.cjs.js",
"types": "./dist/index.d.ts",
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",

@@ -41,7 +44,9 @@ "dist",

],
"eslintIgnore": [
"node_modules",
"dist"
],
"gitHead": "d206aefac2bede58c06a54b18d48eee7537096e0"
}
"publishConfig": {
"access": "public"
},
"module": "./dist/index.mjs",
"scripts": {
"build": "tsup"
}
}

@@ -14,19 +14,19 @@ # @reach/dialog

function Example(props) {
const [showDialog, setShowDialog] = React.useState(false);
const open = () => setShowDialog(true);
const close = () => setShowDialog(false);
const [showDialog, setShowDialog] = React.useState(false);
const open = () => setShowDialog(true);
const close = () => setShowDialog(false);
return (
<div>
<button onClick={open}>Open Dialog</button>
<Dialog isOpen={showDialog} onDismiss={close}>
<button className="close-button" onClick={close}>
<VisuallyHidden>Close</VisuallyHidden>
<span aria-hidden>×</span>
</button>
<p>Hello there. I am a dialog</p>
</Dialog>
</div>
);
return (
<div>
<button onClick={open}>Open Dialog</button>
<Dialog isOpen={showDialog} onDismiss={close}>
<button className="close-button" onClick={close}>
<VisuallyHidden>Close</VisuallyHidden>
<span aria-hidden>×</span>
</button>
<p>Hello there. I am a dialog</p>
</Dialog>
</div>
);
}
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc