Skip to content

Commit

Permalink
style: apply linter suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar committed Sep 27, 2022
1 parent cc2a2ce commit 5342859
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 65 deletions.
76 changes: 38 additions & 38 deletions src/fabric/ScreenNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ import type {
type ScreenEvent = Readonly<{}>;

type ScreenDismissedEvent = Readonly<{
dismissCount: Int32,
dismissCount: Int32;
}>;

type TransitionProgressEvent = Readonly<{
progress: Double,
closing: Int32,
goingForward: Int32,
progress: Double;
closing: Int32;
goingForward: Int32;
}>;

type GestureResponseDistanceType = Readonly<{
start: Float,
end: Float,
top: Float,
bottom: Float,
start: Float;
end: Float;
top: Float;
bottom: Float;
}>;

type StackPresentation =
Expand Down Expand Up @@ -52,36 +52,36 @@ type SwipeDirection = 'vertical' | 'horizontal';
type ReplaceAnimation = 'pop' | 'push';

export interface NativeProps extends ViewProps {
onAppear?: BubblingEventHandler<ScreenEvent>,
onDisappear?: BubblingEventHandler<ScreenEvent>,
onDismissed?: BubblingEventHandler<ScreenDismissedEvent>,
onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>,
onWillAppear?: BubblingEventHandler<ScreenEvent>,
onWillDisappear?: BubblingEventHandler<ScreenEvent>,
onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>,
customAnimationOnSwipe?: boolean,
fullScreenSwipeEnabled?: boolean,
homeIndicatorHidden?: boolean,
preventNativeDismiss?: boolean,
gestureEnabled?: WithDefault<boolean, true>,
statusBarColor?: ColorValue,
statusBarHidden?: boolean,
screenOrientation?: string,
statusBarAnimation?: string,
statusBarStyle?: string,
statusBarTranslucent?: boolean,
gestureResponseDistance?: GestureResponseDistanceType,
stackPresentation?: WithDefault<StackPresentation, 'push'>,
stackAnimation?: WithDefault<StackAnimation, 'default'>,
transitionDuration?: WithDefault<Int32, 350>,
replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>,
swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>,
hideKeyboardOnSwipe?: boolean,
activityState?: WithDefault<Float, -1.0>,
navigationBarColor?: ColorValue,
navigationBarHidden?: boolean,
nativeBackButtonDismissalEnabled?: boolean,
onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>,
onAppear?: BubblingEventHandler<ScreenEvent>;
onDisappear?: BubblingEventHandler<ScreenEvent>;
onDismissed?: BubblingEventHandler<ScreenDismissedEvent>;
onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>;
onWillAppear?: BubblingEventHandler<ScreenEvent>;
onWillDisappear?: BubblingEventHandler<ScreenEvent>;
onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>;
customAnimationOnSwipe?: boolean;
fullScreenSwipeEnabled?: boolean;
homeIndicatorHidden?: boolean;
preventNativeDismiss?: boolean;
gestureEnabled?: WithDefault<boolean, true>;
statusBarColor?: ColorValue;
statusBarHidden?: boolean;
screenOrientation?: string;
statusBarAnimation?: string;
statusBarStyle?: string;
statusBarTranslucent?: boolean;
gestureResponseDistance?: GestureResponseDistanceType;
stackPresentation?: WithDefault<StackPresentation, 'push'>;
stackAnimation?: WithDefault<StackAnimation, 'default'>;
transitionDuration?: WithDefault<Int32, 350>;
replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
hideKeyboardOnSwipe?: boolean;
activityState?: WithDefault<Float, -1.0>;
navigationBarColor?: ColorValue;
navigationBarHidden?: boolean;
nativeBackButtonDismissalEnabled?: boolean;
onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>;
};

export default codegenNativeComponent<NativeProps>('RNSScreen', {
Expand Down
50 changes: 25 additions & 25 deletions src/fabric/ScreenStackHeaderConfigNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ import type {
type DirectionType = 'rtl' | 'ltr';

export interface NativeProps extends ViewProps {
backgroundColor?: ColorValue,
backTitle?: string,
backTitleFontFamily?: string,
backTitleFontSize?: Int32,
color?: ColorValue,
direction?: WithDefault<DirectionType, 'ltr'>,
hidden?: boolean,
hideShadow?: boolean,
largeTitle?: boolean,
largeTitleFontFamily?: string,
largeTitleFontSize?: Int32,
largeTitleFontWeight?: string,
largeTitleBackgroundColor?: ColorValue,
largeTitleHideShadow?: boolean,
largeTitleColor?: ColorValue,
translucent?: boolean,
title?: string,
titleFontFamily?: string,
titleFontSize?: Int32,
titleFontWeight?: string,
titleColor?: ColorValue,
disableBackButtonMenu?: boolean,
hideBackButton?: boolean,
backButtonInCustomView?: boolean,
backgroundColor?: ColorValue;
backTitle?: string;
backTitleFontFamily?: string;
backTitleFontSize?: Int32;
color?: ColorValue;
direction?: WithDefault<DirectionType, 'ltr'>;
hidden?: boolean;
hideShadow?: boolean;
largeTitle?: boolean;
largeTitleFontFamily?: string;
largeTitleFontSize?: Int32;
largeTitleFontWeight?: string;
largeTitleBackgroundColor?: ColorValue;
largeTitleHideShadow?: boolean;
largeTitleColor?: ColorValue;
translucent?: boolean;
title?: string;
titleFontFamily?: string;
titleFontSize?: Int32;
titleFontWeight?: string;
titleColor?: ColorValue;
disableBackButtonMenu?: boolean;
hideBackButton?: boolean;
backButtonInCustomView?: boolean;
// TODO: implement this props on iOS
topInsetEnabled?: boolean,
topInsetEnabled?: boolean;
};

export default codegenNativeComponent<NativeProps>(
Expand Down
2 changes: 1 addition & 1 deletion src/fabric/ScreenStackHeaderSubviewNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type HeaderSubviewTypes =
| 'searchBar';

export interface NativeProps extends ViewProps {
type?: WithDefault<HeaderSubviewTypes, 'left'>,
type?: WithDefault<HeaderSubviewTypes, 'left'>;
}

export default codegenNativeComponent<NativeProps>('RNSScreenStackHeaderSubview', {});
2 changes: 1 addition & 1 deletion src/fabric/ScreenStackNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTyp
type FinishTransitioningEvent = Readonly<{}>;

interface NativeProps extends ViewProps {
onFinishTransitioning?: DirectEventHandler<FinishTransitioningEvent>,
onFinishTransitioning?: DirectEventHandler<FinishTransitioningEvent>;
}

export default codegenNativeComponent<NativeProps>('RNSScreenStack', {});

0 comments on commit 5342859

Please sign in to comment.