Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: new arch android interface #654

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"babel-preset-expo": "^9.2.0",
"react": "18.2.0",
"react-native": "0.73.5",
"react-native-pager-view": "^6.2.3",
"react-native-pager-view": "^6.4.1",
"react-native-windows": "0.73.11"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ public void setValue(ReactSlider view, float value) {
ReactSliderManagerImpl.setValue(view, value);
}

@ReactProp(name = "minimumValue", defaultFloat = 0f)
@ReactProp(name = "minimumValue", defaultDouble = 0f)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@ReactProp(name = "minimumValue", defaultDouble = 0f)
@ReactProp(name = "minimumValue", defaultDouble = 0d)

applies to other places too

public void setMinimumValue(ReactSlider view, double value) {
ReactSliderManagerImpl.setMinimumValue(view, value);
}

@ReactProp(name = "maximumValue", defaultFloat = 1f)
@ReactProp(name = "maximumValue", defaultDouble = 1f)
public void setMaximumValue(ReactSlider view, double value) {
ReactSliderManagerImpl.setMaximumValue(view, value);
}
Expand All @@ -145,8 +145,8 @@ public void setUpperLimit(ReactSlider view, float value) {
ReactSliderManagerImpl.setUpperLimit(view, value);
}

@ReactProp(name = "step", defaultFloat = 0f)
public void setStep(ReactSlider view, float value) {
@ReactProp(name = "step", defaultDouble = 0f)
public void setStep(ReactSlider view, double value) {
ReactSliderManagerImpl.setStep(view, value);
}

Expand Down
7 changes: 4 additions & 3 deletions package/src/RNCSliderNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
WithDefault,
DirectEventHandler,
BubblingEventHandler,
Double,
} from 'react-native/Libraries/Types/CodegenTypes';

type Event = Readonly<{
Expand All @@ -23,15 +24,15 @@ export interface NativeProps extends ViewProps {
tapToSeek?: WithDefault<boolean, false>;
maximumTrackImage?: ImageSource;
maximumTrackTintColor?: ColorValue;
maximumValue?: Float;
maximumValue?: Double;
minimumTrackImage?: ImageSource;
minimumTrackTintColor?: ColorValue;
minimumValue?: Float;
minimumValue?: Double;
onChange?: BubblingEventHandler<Event>;
onRNCSliderSlidingStart?: DirectEventHandler<Event>;
onRNCSliderSlidingComplete?: DirectEventHandler<Event>;
onRNCSliderValueChange?: BubblingEventHandler<Event>;
step?: Float;
step?: Double;
testID?: string;
thumbImage?: ImageSource;
thumbTintColor?: ColorValue;
Expand Down
Loading