Skip to content

Commit 5cd74fd

Browse files
MOO-1752 Remove default props (#261)
2 parents cdbf2dd + 6685b13 commit 5cd74fd

4 files changed

Lines changed: 13 additions & 9 deletions

File tree

packages/pluggableWidgets/intro-screen-native/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We have fixed defaultProps deprecation warning.
12+
913
## [4.0.0] - 2024-12-3
1014

1115
### Changed

packages/pluggableWidgets/intro-screen-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "intro-screen-native",
33
"widgetName": "IntroScreen",
4-
"version": "4.0.0",
4+
"version": "4.0.1",
55
"license": "Apache-2.0",
66
"repository": {
77
"type": "git",

packages/pluggableWidgets/intro-screen-native/src/SwipeableContainer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
165165
[props]
166166
);
167167

168-
const renderNextButton = ({ showNextButton, nextLabel, nextIcon, styles }: SwipeableContainerProps): ReactNode =>
168+
const renderNextButton = ({
169+
showNextButton = true,
170+
nextLabel,
171+
nextIcon,
172+
styles
173+
}: SwipeableContainerProps): ReactNode =>
169174
showNextButton &&
170175
renderButton(
171176
nextLabel,
@@ -193,7 +198,7 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
193198
);
194199

195200
const renderDoneButton = ({
196-
showDoneButton,
201+
showDoneButton = true,
197202
doneLabel,
198203
doneIcon,
199204
onDone,
@@ -328,11 +333,6 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
328333
);
329334
};
330335

331-
SwipeableContainer.defaultProps = {
332-
showDoneButton: true,
333-
showNextButton: true
334-
};
335-
336336
const styles = StyleSheet.create({
337337
flexOne: {
338338
flex: 1

packages/pluggableWidgets/intro-screen-native/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="IntroScreen" version="4.0.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="IntroScreen" version="4.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="IntroScreen.xml" />
66
</widgetFiles>

0 commit comments

Comments
 (0)