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

@uiw/react-dropdown

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-dropdown - npm Package Compare versions

Comparing version 4.21.23 to 5.0.0-bate.2.0

1

cjs/index.d.ts

@@ -8,1 +8,2 @@ import React from 'react';

export default function Dropdown(props: DropdownProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map

@@ -8,1 +8,2 @@ import React from 'react';

export default function Dropdown(props: DropdownProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map

9

package.json
{
"name": "@uiw/react-dropdown",
"version": "4.21.23",
"version": "5.0.0-bate.2.0",
"description": "Dropdown component",

@@ -44,8 +44,9 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"react": ">=16.9.0",
"react-dom": ">=16.9.0"
"react-dom": ">=16.9.0",
"styled-components": ">=5.3.5"
},
"dependencies": {
"@uiw/react-overlay-trigger": "^4.21.23",
"@uiw/utils": "^4.21.23"
"@uiw/react-overlay-trigger": "^5.0.0-bate.2.0",
"@uiw/utils": "^5.0.0-bate.2.0"
}
}

@@ -18,14 +18,14 @@ Dropdown 下拉菜单

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';
import { Dropdown, Menu, ButtonGroup, Button, Divider, Icon } from 'uiw';
import { Reload ,HeartOn,Appstore,BarChart,Setting,} from "@uiw/icons"
const menu = (
<div>
<Menu bordered style={{ minWidth: 120 }}>
<Menu.Item icon="reload" text="重新加载" />
<Menu.Item icon="heart-on" text="另存为" active />
<Menu.Item icon="appstore" text="应用商城" />
<Menu.Item icon="bar-chart" text="月统计报表" />
<Menu.Item icon="setting" text="偏好设置" />
<Menu.Item icon={<Reload/>} text="重新加载" />
<Menu.Item icon={<HeartOn/>} text="另存为" active />
<Menu.Item icon={<Appstore/>} text="应用商城" />
<Menu.Item icon={<BarChart/>} text="月统计报表" />
<Menu.Item icon={<Setting/>} text="偏好设置" />
</Menu>

@@ -53,4 +53,3 @@ </div>

}
export default Demo;
export default Demo
```

@@ -60,15 +59,16 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';
import { Dropdown, Menu, ButtonGroup, Button } from 'uiw';
import { Reload ,HeartOn,Appstore,BarChart,Setting,Copy,More} from "@uiw/icons"
const menu = (
<div>
<Menu bordered style={{ maxWidth: 200 }}>
<Menu.Item icon="reload" text="重新加载" />
<Menu bordered style={{ minWidth: 120 }}>
<Menu.Item icon={<Reload/>} text="重新加载" />
<Menu.Divider />
<Menu.Item icon="heart-on" text="另存为" active />
<Menu.Item icon="appstore" text="应用商城" />
<Menu.Item icon="bar-chart" text="月统计报表导出" />
<Menu.Item icon="setting" text="偏好设置" />
<Menu.Item icon={<HeartOn/>} text="另存为" active />
<Menu.Item icon={<Appstore/>} text="应用商城" />
<Menu.Item icon={<BarChart/>} text="月统计报表" />
<Menu.Item icon={<Setting/>} text="偏好设置" />
</Menu>

@@ -78,35 +78,35 @@ </div>

export default function Demo() {
return(
<div>
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}>
<Button disabled icon="copy">点击右边</Button>
<Dropdown disabled trigger="click" placement="bottomRight" menu={menu}>
<Button icon="more" />
</Dropdown>
</ButtonGroup>
<Dropdown disabled menu={menu}>
<Button basic type="link"> (超连接样式)link </Button>
function Demo() {
return <div>
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}>
<Button disabled icon={<Copy/>}>点击右边</Button>
<Dropdown disabled trigger="click" placement="bottomRight" menu={menu}>
<Button icon={<More/>} />
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="primary">主要按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="success">成功按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="warning">警告按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="danger">错误按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="light">亮按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="dark">暗按钮</Button>
</Dropdown>
</div>
);
</ButtonGroup>
<Dropdown disabled menu={menu}>
<Button basic type="link"> (超连接样式)link </Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="primary">主要按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="success">成功按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="warning">警告按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="danger">错误按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="light">亮按钮</Button>
</Dropdown>
<Dropdown disabled menu={menu}>
<Button type="dark">暗按钮</Button>
</Dropdown>
</div>
}
export default Demo
```

@@ -116,15 +116,16 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';
import { Dropdown, Menu, Divider, ButtonGroup, Button } from 'uiw';
import { Dropdown, Menu, ButtonGroup, Button, Divider } from 'uiw';
import { Reload ,HeartOn,Appstore,BarChart,Setting,Copy,More} from "@uiw/icons"
const menu = (
<div>
<Menu bordered style={{ maxWidth: 200 }}>
<Menu.Item icon="reload" text="重新加载" />
<Menu bordered style={{ minWidth: 120 }}>
<Menu.Item icon={<Reload/>} text="重新加载" />
<Menu.Divider />
<Menu.Item icon="heart-on" text="另存为" active />
<Menu.Item icon="appstore" text="应用商城" />
<Menu.Item icon="bar-chart" text="月统计报表导出" />
<Menu.Item icon="setting" text="偏好设置" />
<Menu.Item icon={<HeartOn/>} text="另存为" active />
<Menu.Item icon={<Appstore/>} text="应用商城" />
<Menu.Item icon={<BarChart/>} text="月统计报表" />
<Menu.Item icon={<Setting/>} text="偏好设置" />
</Menu>

@@ -134,33 +135,32 @@ </div>

export default function Demo() {
return(
<div>
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}>
<Button icon="copy">top</Button>
<Dropdown trigger="click" placement="top" menu={menu}>
<Button icon="more" />
</Dropdown>
</ButtonGroup>
<Dropdown menu={menu} trigger="click" placement="topLeft">
<Button type="primary">topLeft</Button>
function Demo() {
return <div>
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}>
<Button icon={<Copy/>}>top</Button>
<Dropdown trigger="click" placement="top" menu={menu}>
<Button icon={<More/>} />
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="topRight">
<Button type="success">topRight</Button>
</Dropdown>
<Divider />
<Dropdown menu={menu} trigger="click" placement="bottomRight">
<Button type="light">bottomRight</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="bottom">
<Button type="warning">bottom</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="bottomLeft">
<Button type="danger">bottomLeft</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="right">
<Button type="dark">right</Button>
</Dropdown>
</div>
);
</ButtonGroup>
<Dropdown menu={menu} trigger="click" placement="topLeft">
<Button type="primary">topLeft</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="topRight">
<Button type="success">topRight</Button>
</Dropdown>
<Divider />
<Dropdown menu={menu} trigger="click" placement="bottomRight">
<Button type="light">bottomRight</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="bottom">
<Button type="warning">bottom</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="bottomLeft">
<Button type="danger">bottomLeft</Button>
</Dropdown>
<Dropdown menu={menu} trigger="click" placement="right">
<Button type="dark">right</Button>
</Dropdown>
</div>
}
export default Demo
```

@@ -170,3 +170,3 @@

```jsx mdx:preview&bg=#fff
```jsx mdx:preview&background=#fff&codeSandbox=true&codePen=true
import React from 'react';

@@ -233,11 +233,9 @@ import { Dropdown, Menu, Button, Icon } from 'uiw';

export default function Demo() {
return(
<div>
<Select option={option} value={1} onChange={(item) => { console.log('item', item); }} />
<Select option={option2} value={2} onChange={(item) => { console.log('item', item); }} />
</div>
);
function Demo() {
return <div>
<Select option={option} value={1} onChange={(item) => { console.log('item', item); }} />
<Select option={option2} value={2} onChange={(item) => { console.log('item', item); }} />
</div>
}
export default Demo
```

@@ -244,0 +242,0 @@

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc