rc-drawer
Advanced tools
Comparing version 6.5.0 to 6.5.1
@@ -5,3 +5,3 @@ import type { PortalProps } from '@rc-component/portal'; | ||
import type { DrawerPopupProps } from './DrawerPopup'; | ||
import type { DrawerClassNames } from './inter'; | ||
import type { DrawerClassNames, DrawerStyles } from './inter'; | ||
export type Placement = 'left' | 'top' | 'right' | 'bottom'; | ||
@@ -16,4 +16,5 @@ export interface DrawerProps extends Omit<DrawerPopupProps, 'prefixCls' | 'inline' | 'scrollLocker'>, DrawerPanelEvents { | ||
classNames?: DrawerClassNames; | ||
styles?: DrawerStyles; | ||
} | ||
declare const Drawer: React.FC<DrawerProps>; | ||
export default Drawer; |
import type { CSSMotionProps } from 'rc-motion'; | ||
import * as React from 'react'; | ||
import type { DrawerPanelEvents } from './DrawerPanel'; | ||
import type { DrawerClassNames } from './inter'; | ||
import type { DrawerClassNames, DrawerStyles } from './inter'; | ||
export type Placement = 'left' | 'right' | 'top' | 'bottom'; | ||
@@ -37,4 +37,5 @@ export interface PushConfig { | ||
classNames?: DrawerClassNames; | ||
styles?: DrawerStyles; | ||
} | ||
declare const RefDrawerPopup: React.ForwardRefExoticComponent<DrawerPopupProps & React.RefAttributes<HTMLDivElement>>; | ||
export default RefDrawerPopup; |
@@ -54,3 +54,4 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
onKeyDown = props.onKeyDown, | ||
onKeyUp = props.onKeyUp; | ||
onKeyUp = props.onKeyUp, | ||
styles = props.styles; | ||
@@ -171,3 +172,3 @@ // ================================ Refs ================================ | ||
className: classNames("".concat(prefixCls, "-mask"), motionMaskClassName, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.mask, maskClassName), | ||
style: _objectSpread(_objectSpread({}, motionMaskStyle), maskStyle), | ||
style: _objectSpread(_objectSpread(_objectSpread({}, motionMaskStyle), maskStyle), styles === null || styles === void 0 ? void 0 : styles.mask), | ||
onClick: maskClosable && open ? onClose : undefined, | ||
@@ -225,3 +226,3 @@ ref: maskRef | ||
className: classNames("".concat(prefixCls, "-content-wrapper"), drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.wrapper, motionClassName), | ||
style: _objectSpread(_objectSpread(_objectSpread({}, wrapperStyle), motionStyle), contentWrapperStyle) | ||
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, wrapperStyle), motionStyle), contentWrapperStyle), styles === null || styles === void 0 ? void 0 : styles.wrapper) | ||
}, pickAttrs(props, { | ||
@@ -228,0 +229,0 @@ data: true |
@@ -0,1 +1,2 @@ | ||
/// <reference types="react" /> | ||
export interface DrawerClassNames { | ||
@@ -5,1 +6,5 @@ mask?: string; | ||
} | ||
export interface DrawerStyles { | ||
mask?: React.CSSProperties; | ||
wrapper?: React.CSSProperties; | ||
} |
@@ -5,3 +5,3 @@ import type { PortalProps } from '@rc-component/portal'; | ||
import type { DrawerPopupProps } from './DrawerPopup'; | ||
import type { DrawerClassNames } from './inter'; | ||
import type { DrawerClassNames, DrawerStyles } from './inter'; | ||
export type Placement = 'left' | 'top' | 'right' | 'bottom'; | ||
@@ -16,4 +16,5 @@ export interface DrawerProps extends Omit<DrawerPopupProps, 'prefixCls' | 'inline' | 'scrollLocker'>, DrawerPanelEvents { | ||
classNames?: DrawerClassNames; | ||
styles?: DrawerStyles; | ||
} | ||
declare const Drawer: React.FC<DrawerProps>; | ||
export default Drawer; |
import type { CSSMotionProps } from 'rc-motion'; | ||
import * as React from 'react'; | ||
import type { DrawerPanelEvents } from './DrawerPanel'; | ||
import type { DrawerClassNames } from './inter'; | ||
import type { DrawerClassNames, DrawerStyles } from './inter'; | ||
export type Placement = 'left' | 'right' | 'top' | 'bottom'; | ||
@@ -37,4 +37,5 @@ export interface PushConfig { | ||
classNames?: DrawerClassNames; | ||
styles?: DrawerStyles; | ||
} | ||
declare const RefDrawerPopup: React.ForwardRefExoticComponent<DrawerPopupProps & React.RefAttributes<HTMLDivElement>>; | ||
export default RefDrawerPopup; |
@@ -64,3 +64,4 @@ "use strict"; | ||
onKeyDown = props.onKeyDown, | ||
onKeyUp = props.onKeyUp; | ||
onKeyUp = props.onKeyUp, | ||
styles = props.styles; | ||
@@ -181,3 +182,3 @@ // ================================ Refs ================================ | ||
className: (0, _classnames.default)("".concat(prefixCls, "-mask"), motionMaskClassName, drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.mask, maskClassName), | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, motionMaskStyle), maskStyle), | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, motionMaskStyle), maskStyle), styles === null || styles === void 0 ? void 0 : styles.mask), | ||
onClick: maskClosable && open ? onClose : undefined, | ||
@@ -235,3 +236,3 @@ ref: maskRef | ||
className: (0, _classnames.default)("".concat(prefixCls, "-content-wrapper"), drawerClassNames === null || drawerClassNames === void 0 ? void 0 : drawerClassNames.wrapper, motionClassName), | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, wrapperStyle), motionStyle), contentWrapperStyle) | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, wrapperStyle), motionStyle), contentWrapperStyle), styles === null || styles === void 0 ? void 0 : styles.wrapper) | ||
}, (0, _pickAttrs.default)(props, { | ||
@@ -238,0 +239,0 @@ data: true |
@@ -0,1 +1,2 @@ | ||
/// <reference types="react" /> | ||
export interface DrawerClassNames { | ||
@@ -5,1 +6,5 @@ mask?: string; | ||
} | ||
export interface DrawerStyles { | ||
mask?: React.CSSProperties; | ||
wrapper?: React.CSSProperties; | ||
} |
{ | ||
"name": "rc-drawer", | ||
"version": "6.5.0", | ||
"version": "6.5.1", | ||
"description": "drawer component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -48,2 +48,3 @@ # rc-drawer | ||
| classNames | { mask?: string; wrapper?: string; } | - | pass className to target area | | ||
| styles | { mask?: CSSProperties; wrapper?: CSSProperties; } | - | pass style to target area | | ||
| prefixCls | string | 'drawer' | prefix class | | ||
@@ -50,0 +51,0 @@ | width | string \| number | null | drawer content wrapper width, drawer level transition width | |
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
58678
1206
83