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

rc-drawer

Package Overview
Dependencies
Maintainers
5
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-drawer - npm Package Compare versions

Comparing version 6.0.3 to 6.1.0

31

es/Drawer.js
import _extends from "@babel/runtime/helpers/esm/extends";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import * as React from 'react';

@@ -8,3 +8,17 @@ import Portal from '@rc-component/portal';

import { warnCheck } from './util';
var Drawer = function Drawer(props) {
// Default Value.
// Since spread with default value will make this all over components.
// Let's maintain this in one place.
var defaultProps = {
open: false,
prefixCls: 'rc-drawer',
placement: 'right',
autoFocus: true,
keyboard: true,
width: 378,
mask: true,
maskClosable: true
};
var Drawer = function Drawer(drawerProps) {
var props = _objectSpread(_objectSpread({}, defaultProps), drawerProps);
var open = props.open,

@@ -47,15 +61,2 @@ getContainer = props.getContainer,

};
// Default Value.
// Since spread with default value will make this all over components.
// Let's maintain this in one place.
Drawer.defaultProps = {
open: false,
prefixCls: 'rc-drawer',
placement: 'right',
autoFocus: true,
keyboard: true,
width: 378,
mask: true,
maskClosable: true
};
if (process.env.NODE_ENV !== 'production') {

@@ -62,0 +63,0 @@ Drawer.displayName = 'Drawer';

@@ -10,4 +10,4 @@ "use strict";

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var React = _interopRequireWildcard(require("react"));

@@ -19,3 +19,17 @@ var _portal = _interopRequireDefault(require("@rc-component/portal"));

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var Drawer = function Drawer(props) {
// Default Value.
// Since spread with default value will make this all over components.
// Let's maintain this in one place.
var defaultProps = {
open: false,
prefixCls: 'rc-drawer',
placement: 'right',
autoFocus: true,
keyboard: true,
width: 378,
mask: true,
maskClosable: true
};
var Drawer = function Drawer(drawerProps) {
var props = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultProps), drawerProps);
var open = props.open,

@@ -58,15 +72,2 @@ getContainer = props.getContainer,

};
// Default Value.
// Since spread with default value will make this all over components.
// Let's maintain this in one place.
Drawer.defaultProps = {
open: false,
prefixCls: 'rc-drawer',
placement: 'right',
autoFocus: true,
keyboard: true,
width: 378,
mask: true,
maskClosable: true
};
if (process.env.NODE_ENV !== 'production') {

@@ -73,0 +74,0 @@ Drawer.displayName = 'Drawer';

{
"name": "rc-drawer",
"version": "6.0.3",
"version": "6.1.0",
"description": "drawer component for react",

@@ -5,0 +5,0 @@ "keywords": [

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