UNPKG

@wulperstudio/cms

Version:
43 lines 1.8 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["variant", "direction", "animation", "backgroundColor", "boxShadow", "padding", "border", "width", "mainContainerProps", "contentProps"]; import React from 'react'; import { Content, WrapperDrawer, BackDrop } from './styled'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; var DrawerV2 = function DrawerV2(_ref) { var _ref$variant = _ref.variant, variant = _ref$variant === void 0 ? 'persistent' : _ref$variant, _ref$direction = _ref.direction, direction = _ref$direction === void 0 ? 'left' : _ref$direction, _ref$animation = _ref.animation, animation = _ref$animation === void 0 ? false : _ref$animation, backgroundColor = _ref.backgroundColor, boxShadow = _ref.boxShadow, _ref$padding = _ref.padding, padding = _ref$padding === void 0 ? '15px' : _ref$padding, _ref$border = _ref.border, border = _ref$border === void 0 ? 'none' : _ref$border, width = _ref.width, mainContainerProps = _ref.mainContainerProps, contentProps = _ref.contentProps, props = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/_jsxs(WrapperDrawer, _extends({ variant: variant, direction: direction, animation: animation }, mainContainerProps, { children: [/*#__PURE__*/_jsx(Content, _extends({ variant: variant, width: width, backgroundColor: backgroundColor, boxShadow: boxShadow, padding: padding, border: border }, contentProps, { children: props.children })), variant === 'temporary' && /*#__PURE__*/_jsx(BackDrop, { onClick: props.onClose })] })); }; export default DrawerV2;