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

Code before:
   * If true, the menu item will be displayed as destructive.
   *
   * https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive
   */
  destructive?: boolean;
  /**
   * If true, the menu will be kept presented after the action is selected.
   *
   * This is marked as unstable, because when action is selected it will recreate the menu,
   * which will close all opened submenus and reset the scroll position.
   *
   * https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented
   */
  unstable_keepPresented?: boolean;
  /**
   * If true, the menu item will be displayed as selected.
   */
  isOn?: boolean;
  onPress: () => void;
}

/**
 * This component renders a context menu action for a link.
 * It should only be used as a child of `Link.Menu` or `LinkMenu`.
 *
 * **Note:** You can use the alias `Link.MenuAction` for this component.
 *
 * @platform ios
 */
export function LinkMenuAction(props: LinkMenuActionProps) {
  if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !use(InternalLinkPreviewContext)) {
    return null;
  }
  const { unstable_keepPresented, onPress, ...rest } = props;
  return (
    <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.
   */

Review comment (suggestion):
```suggestion
 * > **Note**: You can use the alias `Link.MenuAction` for this component.
```

Code after:
   * If `true`, the menu item will be displayed as destructive.
   *
   * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/destructive) for more information.
   */
  destructive?: boolean;
  /**
   * If `true`, the menu will be kept presented after the action is selected.
   *
   * This is marked as unstable, because when action is selected it will recreate the menu,
   * which will close all opened submenus and reset the scroll position.
   *
   * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/keepsmenupresented) for more information.
   */
  unstable_keepPresented?: boolean;
  /**
   * If `true`, the menu item will be displayed as selected.
   */
  isOn?: boolean;
  onPress: () => void;
}

/**
 * This component renders a context menu action for a link.
 * It should only be used as a child of `Link.Menu` or `LinkMenu`.
 *
 * > **Note**: You can use the alias `Link.MenuAction` for this component.
 *
 * @platform ios
 */
export function LinkMenuAction(props: LinkMenuActionProps) {
  if (useIsPreview() || process.env.EXPO_OS !== 'ios' || !use(InternalLinkPreviewContext)) {
    return null;
  }
  const { unstable_keepPresented, onPress, ...rest } = props;
  return (
    <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.
   */