Skip to content

Commit da63331

Browse files
authored
add forwardRef to DrawerBody (#1166)
1 parent 54f8eac commit da63331

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/Drawer/DrawerBody.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
import React from 'react';
1+
import React, { forwardRef } from 'react';
22
import * as propTypes from 'prop-types';
33

44
import './DrawerBody.scss';
55

6-
const DrawerBody = ({
6+
const DrawerBody = forwardRef(({
77
children,
8-
}) => (
9-
<div className="Drawer__body">
8+
}, ref) => (
9+
<div
10+
className="Drawer__body"
11+
ref={ref}
12+
>
1013
{children}
1114
</div>
12-
);
15+
));
1316

1417
DrawerBody.propTypes = {
1518
children: propTypes.node.isRequired,

0 commit comments

Comments
 (0)