Skip to content

Commit 2525ee0

Browse files
committed
remove propTypes inside forwardRef
1 parent 2d4a6f9 commit 2525ee0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

js/webui/src/elements.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Icon.propTypes = {
4141
className: PropTypes.string,
4242
};
4343

44-
function Button_(props, ref)
44+
export const Button = React.forwardRef(function Button(props, ref)
4545
{
4646
const { name, title, className, href, onClick, active } = props;
4747

@@ -59,9 +59,9 @@ function Button_(props, ref)
5959
<Icon name={name} />
6060
</a>
6161
);
62-
}
62+
});
6363

64-
Button_.propTypes = {
64+
Button.propTypes = {
6565
name: PropTypes.string.isRequired,
6666
title: PropTypes.string.isRequired,
6767
className: PropTypes.string,
@@ -70,8 +70,6 @@ Button_.propTypes = {
7070
active: PropTypes.bool
7171
};
7272

73-
export const Button = React.forwardRef(Button_);
74-
7573
const repeatInterval = 500;
7674

7775
function isLeftButtonOrTouch(e)

0 commit comments

Comments
 (0)