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

@uiw/react-overlay

Package Overview
Dependencies
Maintainers
2
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-overlay - npm Package Compare versions

Comparing version 4.21.18 to 4.21.19

6

package.json
{
"name": "@uiw/react-overlay",
"version": "4.21.18",
"version": "4.21.19",
"description": "Overlay component",

@@ -47,6 +47,6 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"dependencies": {
"@uiw/react-portal": "^4.21.18",
"@uiw/utils": "^4.21.18",
"@uiw/react-portal": "^4.21.19",
"@uiw/utils": "^4.21.19",
"react-transition-group": "~4.4.2"
}
}

@@ -18,9 +18,7 @@ Overlay 基础弹出层

<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
```jsx mdx:preview&bg=#fff
import React from 'react';
import ReactDOM from 'react-dom';
import { Overlay, Button, Card } from 'uiw';
function Demo() {
export default function Demo() {
const [isOpen, setIsOpen] = React.useState(false);

@@ -65,4 +63,2 @@ const [hasBackdrop, setHasBackdrop] = React.useState(true);

}
ReactDOM.render(<Demo />, _mount_);
```

@@ -72,9 +68,7 @@

<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
```jsx mdx:preview&bg=#fff
import React from 'react';
import ReactDOM from 'react-dom';
import { Overlay, Button } from 'uiw';
import { Overlay, Button, Icon } from 'uiw';
function Demo() {
export default function Demo() {
const [isOpen, setIsOpen] = React.useState(false);

@@ -140,4 +134,2 @@ return (

}
ReactDOM.render(<Demo />, _mount_);
```

@@ -149,9 +141,7 @@

<!--rehype:bgWhite=true&noScroll=true&codeSandbox=true&codePen=true-->
```jsx
```jsx mdx:preview&bg=#fff
import React from 'react';
import ReactDOM from 'react-dom';
import { Overlay, Button, Card } from 'uiw';
function Demo() {
export default function Demo() {
const [isOpen, setIsOpen] = React.useState(false);

@@ -162,7 +152,7 @@ function toggleOverlay(e) {

return (
<div>
<div style={{ position: 'relative', minHeight: 200 }}>
<Button type="primary" onClick={toggleOverlay}>点击弹出内容</Button>
<Overlay usePortal={false} isOpen={isOpen} onClose={toggleOverlay}>
<Card active style={{ width: 500 }} active>
<h3 style={{marginTop: 0}}>基础弹出层</h3>
<h3 style={{marginTop: 0}}>基础弹出层1</h3>
<p>Portals 是 react 16 提供的官方解决方案,使得组件可以脱离父组件层级挂载在DOM树的任何位置,我们利用这个方法,可将模态对话框生成到根节点的外面,默认情况生成到跟节点的外面,通过将 usePortal 设置为 false 将对话框生成在父组件层级挂载的DOM树中。</p>

@@ -175,4 +165,2 @@ <Button type="danger" onClick={toggleOverlay}>关闭</Button>

}
ReactDOM.render(<Demo />, _mount_);
```

@@ -186,9 +174,7 @@

<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
```jsx mdx:preview&bg=#fff
import React from 'react';
import ReactDOM from 'react-dom';
import { Overlay, Button, Card } from 'uiw';
function Demo() {
export default function Demo() {
const [isOpen, setIsOpen] = React.useState(false);

@@ -216,4 +202,2 @@ function toggleOverlay(e) {

}
ReactDOM.render(<Demo />, _mount_);
```

@@ -220,0 +204,0 @@

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