first commit
This commit is contained in:
33
frontend/node_modules/rc-drawer/es/DrawerPanel.js
generated
vendored
Normal file
33
frontend/node_modules/rc-drawer/es/DrawerPanel.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
||||
var _excluded = ["prefixCls", "className", "containerRef"];
|
||||
import classNames from 'classnames';
|
||||
import * as React from 'react';
|
||||
import { RefContext } from "./context";
|
||||
import pickAttrs from "rc-util/es/pickAttrs";
|
||||
import { useComposeRef } from "rc-util/es/ref";
|
||||
var DrawerPanel = function DrawerPanel(props) {
|
||||
var prefixCls = props.prefixCls,
|
||||
className = props.className,
|
||||
containerRef = props.containerRef,
|
||||
restProps = _objectWithoutProperties(props, _excluded);
|
||||
var _React$useContext = React.useContext(RefContext),
|
||||
panelRef = _React$useContext.panel;
|
||||
var mergedRef = useComposeRef(panelRef, containerRef);
|
||||
|
||||
// =============================== Render ===============================
|
||||
|
||||
return /*#__PURE__*/React.createElement("div", _extends({
|
||||
className: classNames("".concat(prefixCls, "-content"), className),
|
||||
role: "dialog",
|
||||
ref: mergedRef
|
||||
}, pickAttrs(props, {
|
||||
aria: true
|
||||
}), {
|
||||
"aria-modal": "true"
|
||||
}, restProps));
|
||||
};
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
DrawerPanel.displayName = 'DrawerPanel';
|
||||
}
|
||||
export default DrawerPanel;
|
||||
Reference in New Issue
Block a user