@uiw/react-dropdown
Advanced tools
Comparing version 4.21.18 to 4.21.19
{ | ||
"name": "@uiw/react-dropdown", | ||
"version": "4.21.18", | ||
"version": "4.21.19", | ||
"description": "Dropdown component", | ||
@@ -47,5 +47,5 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/react-overlay-trigger": "^4.21.18", | ||
"@uiw/utils": "^4.21.18" | ||
"@uiw/react-overlay-trigger": "^4.21.19", | ||
"@uiw/utils": "^4.21.19" | ||
} | ||
} |
161
README.md
@@ -18,6 +18,4 @@ Dropdown 下拉菜单 | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&bg=#fff | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Dropdown, Menu, ButtonGroup, Button, Divider, Icon } from 'uiw'; | ||
@@ -55,3 +53,4 @@ | ||
} | ||
ReactDOM.render(<Demo />, _mount_); | ||
export default Demo; | ||
``` | ||
@@ -61,5 +60,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
```jsx mdx:preview&bg=#fff | ||
import React from 'react'; | ||
import { Dropdown, Menu, ButtonGroup, Button } from 'uiw'; | ||
@@ -80,34 +78,35 @@ | ||
ReactDOM.render( | ||
<div> | ||
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}> | ||
<Button disabled icon="copy">点击右边</Button> | ||
<Dropdown disabled trigger="click" placement="bottomRight" menu={menu}> | ||
<Button icon="more" /> | ||
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> | ||
</Dropdown> | ||
</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>, | ||
_mount_ | ||
); | ||
<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> | ||
); | ||
} | ||
``` | ||
@@ -117,6 +116,5 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
import ReactDOM from 'react-dom'; | ||
import { Dropdown, Menu, ButtonGroup, Button } from 'uiw'; | ||
```jsx mdx:preview&bg=#fff | ||
import React from 'react'; | ||
import { Dropdown, Menu, Divider, ButtonGroup, Button } from 'uiw'; | ||
@@ -136,32 +134,33 @@ const menu = ( | ||
ReactDOM.render( | ||
<div> | ||
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}> | ||
<Button icon="copy">top</Button> | ||
<Dropdown trigger="click" placement="top" menu={menu}> | ||
<Button icon="more" /> | ||
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> | ||
</Dropdown> | ||
</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>, | ||
_mount_ | ||
); | ||
<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> | ||
); | ||
} | ||
``` | ||
@@ -171,6 +170,4 @@ | ||
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true--> | ||
```jsx | ||
```jsx mdx:preview&bg=#fff | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Dropdown, Menu, Button, Icon } from 'uiw'; | ||
@@ -236,9 +233,11 @@ | ||
ReactDOM.render( | ||
<div> | ||
<Select option={option} value={1} onChange={(item) => { console.log('item', item); }} /> | ||
<Select option={option2} value={2} onChange={(item) => { console.log('item', item); }} /> | ||
</div>, | ||
_mount_ | ||
); | ||
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> | ||
); | ||
} | ||
``` | ||
@@ -245,0 +244,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16985
246
Updated@uiw/utils@^4.21.19