@antscorp/antsomi-ui 1.3.5-beta.135 → 1.3.5-beta.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,10 +18,10 @@ import { CloseBtn, Content, LeftMenu, MenuFooter, MenuItem, StyledDrawer } from
|
|
|
18
18
|
// Constants
|
|
19
19
|
const DRAWER_WIDTH_DEFAULT = 'calc(100vw - 70px)';
|
|
20
20
|
export const DrawerDetail = props => {
|
|
21
|
-
const { width = DRAWER_WIDTH_DEFAULT, fullScreen, children, menuProps,
|
|
21
|
+
const { width = DRAWER_WIDTH_DEFAULT, fullScreen, children, menuProps, closeIconProps } = props, restProps = __rest(props, ["width", "fullScreen", "children", "menuProps", "closeIconProps"]);
|
|
22
22
|
const { show: showMenu = true, showClose = true, items, selectedKeys, footer, onClick = () => { }, } = menuProps || {};
|
|
23
23
|
const { onClose = () => { } } = props;
|
|
24
|
-
const _a =
|
|
24
|
+
const _a = closeIconProps || {}, { show: showCloseIcon, onClick: onCloseIconClick = () => { } } = _a, restOfCloseIcon = __rest(_a, ["show", "onClick"]);
|
|
25
25
|
return (React.createElement(StyledDrawer, Object.assign({}, restProps, { closable: false, width: fullScreen ? '100vw' : width, classNames: {
|
|
26
26
|
body: 'drawer-detail-body',
|
|
27
27
|
} }),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DrawerDetail } from './DrawerDetail';
|
|
2
|
-
export type
|
|
2
|
+
export type * from './types';
|
|
@@ -3,13 +3,13 @@ import type { DrawerProps, MenuProps as AntdProps } from 'antd';
|
|
|
3
3
|
import { ItemType } from 'antd/es/menu/hooks/useItems';
|
|
4
4
|
export interface DrawerDetailProps extends Omit<DrawerProps, 'closeIcon'> {
|
|
5
5
|
fullScreen?: boolean;
|
|
6
|
-
menuProps?:
|
|
7
|
-
|
|
6
|
+
menuProps?: DrawerDetailMenuProps;
|
|
7
|
+
closeIconProps?: DrawerDetailCloseIconProps;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface DrawerDetailCloseIconProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
|
|
10
10
|
show?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface DrawerDetailMenuProps extends Omit<AntdProps, 'onClick'> {
|
|
13
13
|
show?: boolean;
|
|
14
14
|
showClose?: boolean;
|
|
15
15
|
footer?: ReactNode;
|