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 5.0.0-bate-1 to 5.0.0-bate-10

26

cjs/index.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
Object.defineProperty(exports, "__esModule", {

@@ -11,25 +9,18 @@ value: true

exports["default"] = Dropdown;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireWildcard(require("react"));
var _reactOverlayTrigger = _interopRequireDefault(require("@uiw/react-overlay-trigger"));
var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["prefixCls", "placement", "className", "menu", "children", "disabled"];
function Dropdown(props) {
var _props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'w-dropdown' : _props$prefixCls,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
className = props.className,
menu = props.menu,
children = props.children,
disabled = props.disabled,
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
prefixCls = _props$prefixCls === void 0 ? 'w-dropdown' : _props$prefixCls,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
className = props.className,
menu = props.menu,
children = props.children,
disabled = props.disabled,
other = (0, _objectWithoutProperties2["default"])(props, _excluded);
var cls = (0, _react.useMemo)(function () {

@@ -49,4 +40,3 @@ return [prefixCls, className].filter(Boolean).join(' ').trim();

}
module.exports = exports.default;
//# sourceMappingURL=index.js.map

@@ -10,11 +10,10 @@ import _extends from "@babel/runtime/helpers/extends";

var {
prefixCls = 'w-dropdown',
placement = 'bottomLeft',
className,
menu,
children,
disabled
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
prefixCls = 'w-dropdown',
placement = 'bottomLeft',
className,
menu,
children,
disabled
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
var cls = useMemo(() => [prefixCls, className].filter(Boolean).join(' ').trim(), [prefixCls, className]);

@@ -21,0 +20,0 @@ return /*#__PURE__*/_jsx(OverlayTrigger, _extends({

{
"name": "@uiw/react-dropdown",
"version": "5.0.0-bate-1",
"version": "5.0.0-bate-10",
"description": "Dropdown component",

@@ -48,5 +48,5 @@ "author": "Kenny Wong <wowohoo@qq.com>",

"dependencies": {
"@uiw/react-overlay-trigger": "^5.0.0-bate-1",
"@uiw/utils": "^5.0.0-bate-1"
"@uiw/react-overlay-trigger": "^5.0.0-bate-10",
"@uiw/utils": "^5.0.0-bate-10"
}
}

@@ -21,11 +21,11 @@ Dropdown 下拉菜单

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>

@@ -61,12 +61,13 @@ </div>

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>

@@ -76,8 +77,9 @@ </div>

function Demo() {
return <div>
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}>
<Button disabled icon="copy">点击右边</Button>
<Button disabled icon={<Copy/>}>点击右边</Button>
<Dropdown disabled trigger="click" placement="bottomRight" menu={menu}>
<Button icon="more" />
<Button icon={<More/>} />
</Dropdown>

@@ -116,21 +118,23 @@ </ButtonGroup>

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>
</div>
);
function Demo() {
return <div>
<ButtonGroup style={{ marginRight: 5, display: 'inline-block' }}>
<Button icon="copy">top</Button>
<Button icon={<Copy/>}>top</Button>
<Dropdown trigger="click" placement="top" menu={menu}>
<Button icon="more" />
<Button icon={<More/>} />
</Dropdown>

@@ -137,0 +141,0 @@ </ButtonGroup>

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