Skip to content

Commit

Permalink
Merge pull request #761 from grahammendick/non-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
grahammendick authored Dec 30, 2023
2 parents f383cbf + baaf139 commit 984ca7f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions documentation/native/bottom-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,18 @@ <h1>Bottom Sheet</h1>
&lt;BottomSheet modal={true}>
&lt;ScrollView nestedScrollEnabled={true} />
&lt;/BottomSheet></code></pre>
<div class="Note">
<h2>Note</h2>
On iOS, the animation isn't completely smooth. Removing the stutter, when quickly dragging the sheet, will have to wait until React Native introduces synchronous view resizing.
</div>
<h2>Non-modal Bottom Sheet (Android)</h2>
<p>
You can also have a non-modal <code>BottomSheet</code> on Android. The <code>BottomSheet</code> is 100% native so it must be a child of a <code>CoordinatorLayout</code>. In our email example, we make the sheet non-modal so the user can compose a reply while viewing the sender's details.
You can also have a non-modal <code>BottomSheet</code>. The <code>BottomSheet</code> is 100% native so, on Android, it must be a child of a <code>CoordinatorLayout</code>. In our email example, we make the sheet non-modal so the user can compose a reply while viewing the sender's details.
</p>
<pre><code class="language-jsx">&lt;CoordinatorLayout>
&lt;BottomSheet modal={false}>
&lt;ScrollView nestedScrollEnabled={true} />
&lt;/BottomSheet>
&lt;/CoordinatorLayout></code></pre>
<div class="Note">
<h2>Note</h2>
On iOS, dragging the sheet isn't completely smooth. Removing the slight stutter will have to wait until React Native introduces synchronous view resizing.
</div>
<h2>Controlling the Bottom Sheet</h2>
<p>
The resting states of a <code>BottomSheet</code> are called detents, for example, 'collapsed' or 'expanded'. By default the <code>BottomSheet</code> is uncontrolled, where only the user can change the detent (by dragging). But it can also be controlled so you can programmatically change the detent. In our email example, when the user presses the sender's icon button we expand the <code>BottomSheet</code> to reveal the sender's details.
Expand Down

0 comments on commit 984ca7f

Please sign in to comment.