Repository: expo/expo
File: packages/expo-router/src/link/elements.tsx (TypeScript)

Code before:
    <NativeLinkPreviewAction
      {...rest}
      onSelected={onPress}
      keepPresented={unstable_keepPresented}
    />
  );
}

export interface LinkMenuProps {
  /**
   * The title of the menu item
   */
  title?: string;
  /**
   * Optional SF Symbol displayed alongside the menu item.
   */
  icon?: string;
  /**
   * If true, the menu will be displayed as a palette.
   * This means that the menu will be displayed as one row
   *
   * https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette
   */
  displayAsPalette?: boolean;
  /**
   * If true, the menu will be displayed inline.
   * This means that the menu will not be collapsed
   *
   * https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline
   */
  displayInline?: boolean;
  /**
   * If true, the menu item will be displayed as destructive.
   *
   * https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/destructive
   */
  destructive?: boolean;
  children: ReactElement<LinkMenuActionProps> | ReactElement<LinkMenuActionProps>[];
}

/**
 * Groups context menu actions for a link.
 *
 * If multiple `Link.Menu` components are used within a single `Link`, only the first will be rendered.
 * Only `Link.MenuAction` and `LinkMenuAction` components are allowed as children.
 *
 * @example
 * ```tsx
 * <Link.Menu>
 *   <Link.MenuAction title="Action 1" onPress={() => {}} />
 *   <Link.MenuAction title="Action 2" onPress={() => {}} />

Review comment (suggestion):
```suggestion
   * If `true`, the menu will be displayed inline.
```

Code after:
    <NativeLinkPreviewAction
      {...rest}
      onSelected={onPress}
      keepPresented={unstable_keepPresented}
    />
  );
}

export interface LinkMenuProps {
  /**
   * The title of the menu item
   */
  title?: string;
  /**
   * Optional SF Symbol displayed alongside the menu item.
   */
  icon?: string;
  /**
   * If `true`, the menu will be displayed as a palette.
   * This means that the menu will be displayed as one row
   *
   * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayaspalette) for more information.
   */
  displayAsPalette?: boolean;
  /**
   * If `true`, the menu will be displayed inline.
   * This means that the menu will not be collapsed
   *
   * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/displayinline) for more information.
   */
  displayInline?: boolean;
  /**
   * If `true`, the menu item will be displayed as destructive.
   *
   * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenu/options-swift.struct/destructive) for more information.
   */
  destructive?: boolean;
  children: ReactElement<LinkMenuActionProps> | ReactElement<LinkMenuActionProps>[];
}

/**
 * Groups context menu actions for a link.
 *
 * If multiple `Link.Menu` components are used within a single `Link`, only the first will be rendered.
 * Only `Link.MenuAction` and `LinkMenuAction` components are allowed as children.
 *
 * @example
 * ```tsx
 * <Link.Menu>
 *   <Link.MenuAction title="Action 1" onPress={() => {}} />
 *   <Link.MenuAction title="Action 2" onPress={() => {}} />