managarten/apps-archived/memoro/apps/mobile/features/menus/ReadMes/react-native-action-sheet.md
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

6.7 KiB

react-native-action-sheet

@expo/react-native-action-sheet npm License: MIT Discord

React Native Action Sheet is a cross-platform React Native component that uses the native UIActionSheet on iOS and a pure JS implementation on Android.

iOS Android Web Check out the example snack here! Installation npm install @expo/react-native-action-sheet or

yarn add @expo/react-native-action-sheet A basic ActionSheet Setup

  1. Wrap your top-level component with ReactNativeActionSheet uses React context to allow your components to invoke the menu. This means your app needs to be wrapped with the ActionSheetProvider component first.

import { ActionSheetProvider } from '@expo/react-native-action-sheet';

export default function AppContainer() { return ( ); } 2. Call the showActionSheetWithOptions method with a hook or a higher order component. // Using the provided hook import { useActionSheet } from '@expo/react-native-action-sheet';

export default Menu() { const { showActionSheetWithOptions } = useActionSheet();

const onPress = () => { const options = ['Delete', 'Save', 'Cancel']; const destructiveButtonIndex = 0; const cancelButtonIndex = 2;

showActionSheetWithOptions({
  options,
  cancelButtonIndex,
  destructiveButtonIndex
}, (selectedIndex: number) => {
  switch (selectedIndex) {
    case 1:
      // Save
      break;

    case destructiveButtonIndex:
      // Delete
      break;

    case cancelButtonIndex:
      // Canceled
  }});

}

return (