Skip to content

Commit

Permalink
docs: updated modal hooks docs (#172)
Browse files Browse the repository at this point in the history
* Update hooks.md

* Update usage.md
  • Loading branch information
mr-moto committed Jan 9, 2021
1 parent 9a8a006 commit ec725a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions website/docs/modal/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ This hook provides modal functionalities only, for sheet functionalities please
> This hook works at any component in `BottomSheetModalProvider`.
```tsx
import { useBottomSheet} from '@gorhom/bottom-sheet';
import { useBottomSheetModal } from '@gorhom/bottom-sheet';

const SheetContent = () => {
const { dismiss, dismissAll } = useBottomSheet();
const { dismiss, dismissAll } = useBottomSheetModal();

return (
<View>
Expand All @@ -39,4 +39,4 @@ Dismiss a modal by its name/key.
type dismissAll = () => void;
```

Dismiss all mounted/presented modals.
Dismiss all mounted/presented modals.
5 changes: 2 additions & 3 deletions website/docs/modal/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ Here is a simple usage of the **Bottom Sheet Modal**, with non-scrollable conten

```tsx
import React, { useCallback, useMemo, useRef } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { View, Text, StyleSheet, Button } from 'react-native';
import {
BottomSheetModal,
BottomSheetModalProvider,
} from '@gorhom/bottom-sheet';
import { Button } from 'react-native';

const App = () => {
// ref
Expand Down Expand Up @@ -69,4 +68,4 @@ const styles = StyleSheet.create({
});

export default App;
```
```

0 comments on commit ec725a1

Please sign in to comment.