From 04cffb8a142ea7e414e88d0caa0b840ffcadc29f Mon Sep 17 00:00:00 2001 From: Matthew Wolfe Date: Sat, 15 Oct 2022 14:22:33 -0700 Subject: [PATCH] minor: add useActionSheet hook --- App.tsx | 18 ++++++- babel.config.js | 3 +- src/hooks/useActionSheet/index.ts | 1 + src/hooks/useActionSheet/useActionSheet.ts | 56 ++++++++++++++++++++++ src/index.ts | 4 ++ 5 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 src/hooks/useActionSheet/index.ts create mode 100644 src/hooks/useActionSheet/useActionSheet.ts diff --git a/App.tsx b/App.tsx index b952ab4..1dd1e37 100644 --- a/App.tsx +++ b/App.tsx @@ -8,12 +8,16 @@ import { Table } from 'components/Table'; import { TextInput } from 'components/TextInput'; import { TopNavigation } from 'components/TopNavigation'; +import { useActionSheet } from 'hooks/useActionSheet'; + function App() { + const { showActionSheetWithOptions } = useActionSheet(); + const [activeTab, setActiveTab] = useState(0); return ( - + , title: 'Back' }} right={{ title: 'Save' }} @@ -57,6 +61,18 @@ function App() { rows={[{ rightIcon: true, title: 'Z17AHW' }, { title: 'HP24' }, { title: 'My Wifi' }]} /> + + +