Skip to content
Closed
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
3 changes: 2 additions & 1 deletion ios/RNSEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,6 @@ typedef NS_ENUM(NSInteger, RNSOptionalBoolean) {

typedef NS_ENUM(NSInteger, RNSBottomTabsAccessoryEnvironment) {
RNSBottomTabsAccessoryEnvironmentRegular,
RNSBottomTabsAccessoryEnvironmentInline
RNSBottomTabsAccessoryEnvironmentInline,
RNSBottomTabsAccessoryEnvironmentNone
};
5 changes: 5 additions & 0 deletions ios/conversion/RNSConversions-BottomTabs.mm
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ RNSScrollEdgeEffect RNSBottomTabsScrollEdgeEffectFromBottomTabsScreenTopScrollEd
return react::RNSBottomTabsAccessoryEventEmitter::OnEnvironmentChangeEnvironment::Regular;
case UITabAccessoryEnvironmentInline:
return react::RNSBottomTabsAccessoryEventEmitter::OnEnvironmentChangeEnvironment::Inline;
case UITabAccessoryEnvironmentNone:
return react::RNSBottomTabsAccessoryEventEmitter::OnEnvironmentChangeEnvironment::None;
default:
RCTLogError(@"[RNScreens] Unsupported environment for onEnvironmentChange event");
return react::RNSBottomTabsAccessoryEventEmitter::OnEnvironmentChangeEnvironment::Regular;
Expand All @@ -432,6 +434,9 @@ RNSBottomTabsAccessoryEnvironment RNSBottomTabsAccessoryEnvironmentFromCppEquiva
case Inline:
return RNSBottomTabsAccessoryEnvironmentInline;

case None:
return RNSBottomTabsAccessoryEnvironmentNone;

default:
RCTLogError(@"[RNScreens] Unsupported BottomTabsAccessory environment");
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/bottom-tabs/BottomTabsAccessory.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NativeSyntheticEvent, ViewProps } from 'react-native';

export type BottomTabsAccessoryEnvironment = 'regular' | 'inline';
export type BottomTabsAccessoryEnvironment = 'regular' | 'inline' | 'none';

export type EnvironmentChangeEvent = {
environment: BottomTabsAccessoryEnvironment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNati
import type { ViewProps } from 'react-native';
import { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';

type BottomAccessoryEnvironment = 'regular' | 'inline';
type BottomAccessoryEnvironment = 'regular' | 'inline' | 'none';

export interface NativeProps extends ViewProps {
environment?: WithDefault<BottomAccessoryEnvironment, 'regular'>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { ViewProps } from 'react-native';
import { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';

type EnvironmentChangeEvent = {
environment: 'regular' | 'inline';
environment: 'regular' | 'inline' | 'none';
};

export interface NativeProps extends ViewProps {
Expand Down