@uiw/react-dropdown
Advanced tools
Comparing version 4.21.23 to 5.0.0-bate.2.0
@@ -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 |
{ | ||
"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" | ||
} | ||
} |
184
README.md
@@ -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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
18204
5
1
244
+ Added@emotion/is-prop-valid@1.2.2(transitive)
+ Added@emotion/memoize@0.8.1(transitive)
+ Added@emotion/unitless@0.8.1(transitive)
+ Added@types/stylis@4.2.5(transitive)
+ Added@uiw/react-overlay@5.0.0-bate-9(transitive)
+ Added@uiw/react-overlay-trigger@5.0.0-bate-9(transitive)
+ Added@uiw/react-portal@5.0.0-bate-9(transitive)
+ Added@uiw/utils@5.0.0-bate-9(transitive)
+ Addedcamelize@1.0.1(transitive)
+ Addedcss-color-keywords@1.0.0(transitive)
+ Addedcss-to-react-native@3.2.0(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.38(transitive)
+ Addedpostcss-value-parser@4.2.0(transitive)
+ Addedshallowequal@1.1.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedstyled-components@6.1.13(transitive)
+ Addedstylis@4.3.2(transitive)
+ Addedtslib@2.6.2(transitive)
- Removed@uiw/react-overlay@4.22.3(transitive)
- Removed@uiw/react-overlay-trigger@4.22.3(transitive)
- Removed@uiw/react-portal@4.22.3(transitive)
- Removed@uiw/utils@4.22.3(transitive)
Updated@uiw/utils@^5.0.0-bate.2.0