Skip to content

Commit

Permalink
Remove defaultProps syntax from functional components (#527)
Browse files Browse the repository at this point in the history
* Remove defaultProps syntax from functional components

* v4.5.3
  • Loading branch information
kapantzak authored May 10, 2024
1 parent c3d1e4b commit 3dac785
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 262 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/netdata-ui",
"version": "4.5.2",
"version": "4.5.3",
"description": "netdata UI kit",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
9 changes: 2 additions & 7 deletions src/components/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export const Button = forwardRef(
(
{
label,
icon,
icon = null,
flavour,
isLoading,
loadingLabel,
onClick,
onClick = () => {},
textTransform = "firstLetter",
iconColor,
iconSize,
Expand Down Expand Up @@ -52,8 +52,3 @@ export const Button = forwardRef(
</StyledButton>
)
)

Button.defaultProps = {
onClick: () => {},
icon: null,
}
7 changes: 1 addition & 6 deletions src/components/checkbox/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Checkbox = forwardRef(
disabled,
iconProps,
indeterminate,
Label,
Label = Text,
label,
labelProps,
labelPosition = "left",
Expand Down Expand Up @@ -73,8 +73,3 @@ export const Checkbox = forwardRef(
)
}
)

Checkbox.defaultProps = {
Label: Text,
labelPosition: "right",
}
Loading

0 comments on commit 3dac785

Please sign in to comment.