Skip to content

Commit 3391700

Browse files
committed
Add drawerStyle
1 parent 9c60760 commit 3391700

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

HISTORY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ History
22

33
---
44

5+
## 2.1.0
6+
7+
- Add `drawerStyle`.
8+
59
## 1.5.0
610

711
1. Rename `handleChild` -> `handled`, remove `handleStyle`.
@@ -23,4 +27,4 @@ add `maskStyle`;
2327
### Func
2428

2529
1. add `top` `bottom` placement.
26-
2. `handleChild` type remove Array;
30+
2. `handleChild` type remove Array;

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ ReactDom.render(
6363
| ease | string | `cubic-bezier(0.78, 0.14, 0.15, 0.86)` | level animation timing function |
6464
| getContainer | string \| func \| HTMLElement | `body` | Return the mount node for Drawer. if is `null` use React.creactElement |
6565
| showMask | boolean | true | mask is show |
66-
| maskClosable | boolean | true | Clicking on the mask (area outside the Drawer) to close the Drawer or not. |
67-
| maskStyle | object | null | mask style |
66+
| maskClosable | boolean | true | Clicking on the mask (area outside the Drawer) to close the Drawer or not. |
67+
| maskStyle | CSSProperties | null | mask style |
68+
| drawerStyle | CSSProperties | null | style of the drawer popup element |
6869
| onChange | func | null | change callback(open) |
6970
| afterVisibleChange | func | null | transition end callback(open) |
7071
| onClose | func | null | close click function |

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,32 @@
4444
"react": "*"
4545
},
4646
"devDependencies": {
47-
"@types/classnames": "^2.2.6",
47+
"@types/classnames": "^2.2.9",
4848
"@types/enzyme": "^3.1.15",
4949
"@types/jest": "^24.0.15",
5050
"@types/raf": "^3.4.0",
51-
"@types/react": "^16.7.17",
52-
"@types/react-dom": "^16.0.11",
51+
"@types/react": "^16.9.5",
52+
"@types/react-dom": "^16.9.1",
5353
"@types/react-lifecycles-compat": "^3.0.1",
5454
"@types/warning": "^3.0.0",
55-
"enzyme": "^3.8.0",
56-
"enzyme-adapter-react-16": "^1.7.1",
57-
"enzyme-to-json": "^3.3.5",
55+
"enzyme": "^3.10.0",
56+
"enzyme-adapter-react-16": "^1.14.0",
57+
"enzyme-to-json": "^3.4.2",
5858
"father": "^2.13.2",
5959
"jsonp": "^0.2.0",
6060
"np": "^5.0.3",
61-
"pre-commit": "1.x",
61+
"pre-commit": "^1.2.2",
6262
"querystring": "^0.2.0",
6363
"rc-test": "^6.0.1",
64-
"react": "^16.0.0",
65-
"react-dom": "^16.0.0",
66-
"react-test-renderer": "^16.0.0",
67-
"typescript": "^3.5.2"
64+
"react": "^16.10.2",
65+
"react-dom": "^16.10.2",
66+
"react-test-renderer": "^16.10.2",
67+
"typescript": "^3.6.3"
6868
},
6969
"dependencies": {
70-
"babel-runtime": "6.x",
71-
"classnames": "^2.2.5",
72-
"rc-util": "^4.7.0",
70+
"babel-runtime": "^6.26.0",
71+
"classnames": "^2.2.6",
72+
"rc-util": "^4.11.2",
7373
"react-lifecycles-compat": "^3.0.4"
7474
}
7575
}

src/DrawerChild.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
450450
showMask,
451451
maskClosable,
452452
maskStyle,
453+
drawerStyle,
453454
onClose,
454455
onHandleClick,
455456
keyboard,
@@ -515,6 +516,7 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
515516
msTransform: transform,
516517
width: isNumeric(width) ? `${width}px` : width,
517518
height: isNumeric(height) ? `${height}px` : height,
519+
...drawerStyle,
518520
}}
519521
ref={c => {
520522
this.contentWrapper = c as HTMLElement;

0 commit comments

Comments
 (0)