Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Drawer: React.FC<DrawerProps> = forwardRef((originProps, ref) => {
title,
footer,
showOverlay,
overlayProps,
zIndex,
isPlugin,
closeOnOverlayClick,
Expand Down Expand Up @@ -97,6 +98,7 @@ const Drawer: React.FC<DrawerProps> = forwardRef((originProps, ref) => {
placement={placement}
destroyOnClose={destroyOnClose}
showOverlay={showOverlay}
overlayProps={overlayProps}
zIndex={zIndex}
onVisibleChange={handleOverlayClick}
>
Expand Down
1 change: 1 addition & 0 deletions src/drawer/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TdDrawerProps } from './type';
export const drawerDefaultProps: TdDrawerProps = {
closeOnOverlayClick: true,
destroyOnClose: false,
overlayProps: {},
placement: 'right',
showOverlay: true,
visible: false,
Expand Down
3 changes: 2 additions & 1 deletion src/drawer/drawer.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ closeOnOverlayClick | Boolean | true | \- | N
destroyOnClose | Boolean | false | \- | N
footer | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon?: TNode; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
overlayProps | Object | {} | Typescript:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
placement | String | right | options: left/right | N
showOverlay | Boolean | true | \- | N
title | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
Expand Down Expand Up @@ -62,4 +63,4 @@ Name | Default Value | Description
--td-drawer-title-color | @text-color-primary | -
--td-drawer-title-font-size | 18px | -
--td-drawer-title-padding | 24px 16px 8px | -
--td-drawer-width | 280px | -
--td-drawer-width | 280px | -
3 changes: 2 additions & 1 deletion src/drawer/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ closeOnOverlayClick | Boolean | true | 点击蒙层时是否触发抽屉关闭
destroyOnClose | Boolean | false | 抽屉关闭时是否销毁节点 | N
footer | TElement | - | 抽屉的底部。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon?: TNode; }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
overlayProps | Object | {} | 遮罩层的属性,透传至 overlay。TS 类型:`OverlayProps`,[Overlay API Documents](./overlay?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
placement | String | right | 抽屉方向。可选项:left/right | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
title | TNode | - | 抽屉的标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
Expand Down Expand Up @@ -62,4 +63,4 @@ options | \- | - | TS 类型:`DrawerOptions`
--td-drawer-title-color | @text-color-primary | -
--td-drawer-title-font-size | 18px | -
--td-drawer-title-padding | 24px 16px 8px | -
--td-drawer-width | 280px | -
--td-drawer-width | 280px | -
6 changes: 6 additions & 0 deletions src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { OverlayProps } from '../overlay';
import { TNode, TElement, Styles, AttachNode } from '../common';
import { MouseEvent } from 'react';

Expand All @@ -30,6 +31,11 @@ export interface TdDrawerProps {
* 抽屉里的列表项
*/
items?: DrawerItem[];
/**
* 遮罩层的属性,透传至 overlay
* @default {}
*/
overlayProps?: OverlayProps;
/**
* 抽屉方向
* @default right
Expand Down
Loading