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

Code before:
   * Optional SF Symbol displayed alongside the menu item.
   */
  icon?: SFSymbol;
  /**
   * If true, the menu item will be disabled and not selectable.
   *
   * https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled
   */
  disabled?: boolean;
  /**
   * 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}
    />
  );

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

Code after:
   * Optional SF Symbol displayed alongside the menu item.
   */
  icon?: SFSymbol;
  /**
   * If `true`, the menu item will be disabled and not selectable.
   *
   * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uimenuelement/attributes/disabled) for more information.
   */
  disabled?: boolean;
  /**
   * 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}
    />
  );