diff --git a/ios/NewArch/MenuView.mm b/ios/NewArch/MenuView.mm index a54e619e..0550f46a 100644 --- a/ios/NewArch/MenuView.mm +++ b/ios/NewArch/MenuView.mm @@ -134,6 +134,7 @@ - (void)onOpenMenu { @"image": [NSString stringWithUTF8String:action.image.c_str()], @"imageColor": @(action.imageColor), @"displayInline": @(action.displayInline), + @"preferredElementSize": [NSString stringWithUTF8String:action.preferredElementSize.c_str()], @"attributes": @{ @"destructive": @(action.attributes.destructive), @"disabled": @(action.attributes.disabled), diff --git a/src/NativeModuleSpecs/UIMenuNativeComponent.ts b/src/NativeModuleSpecs/UIMenuNativeComponent.ts index fc929a39..e065a154 100644 --- a/src/NativeModuleSpecs/UIMenuNativeComponent.ts +++ b/src/NativeModuleSpecs/UIMenuNativeComponent.ts @@ -1,9 +1,11 @@ import type { DirectEventHandler, Int32, + WithDefault } from "react-native/Libraries/Types/CodegenTypes"; import type { HostComponent, ViewProps } from "react-native"; import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent"; + /* Caution, those below are not just typescript types. Codegen is using them to create the corresponding C++ data types. @@ -37,6 +39,7 @@ type MenuAction = { image?: string; imageColor?: Int32; displayInline?: boolean; + preferredElementSize?: WithDefault; attributes?: { destructive?: boolean; disabled?: boolean;