Skip to content

Commit 45df63b

Browse files
committed
docs: added videos/screenshots for Stack
1 parent ecc8b59 commit 45df63b

10 files changed

+56
-4
lines changed
Binary file not shown.
Binary file not shown.
848 KB
Binary file not shown.
15.9 KB
Loading
172 KB
Binary file not shown.
61.3 KB
Binary file not shown.
759 KB
Binary file not shown.
794 KB
Binary file not shown.
Binary file not shown.

‎versioned_docs/version-7.x/stack-navigator.md

+56-4
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,20 @@ Use this prop to have a semi-transparent dark overlay visible under the card dur
231231

232232
Function which returns a React Element to display as the overlay for the card. Make sure to set `cardOverlayEnabled` to `true` when using this.
233233

234+
<video playsInline autoPlay muted loop>
235+
<source src="/assets/7.x/stack/cardOverlay.mp4" />
236+
</video>
237+
238+
Example:
239+
```js
240+
screenOptions={{
241+
cardOverlayEnabled: true,
242+
cardOverlay: () => (
243+
<View style={{ flex: 1, backgroundColor: 'gray', opacity: 0.5 }} />
244+
),
245+
}}
246+
```
247+
234248
#### `cardStyle`
235249

236250
Style object for the card in stack. You can provide a custom background color to use instead of the default background here.
@@ -244,26 +258,45 @@ On Web, the height of the screen isn't limited to the height of the viewport. Th
244258
This is shortcut option which configures several options to configure the style for rendering and transitions:
245259

246260
- `card`: Use the default OS animations for iOS and Android screen transitions.
261+
<video playsInline autoPlay muted loop>
262+
<source src="/assets/7.x/stack/presentation-card.mp4" />
263+
</video>
264+
247265
- `modal`: Use Modal animations. This changes a few things:
248266
- Sets `headerMode` to `screen` for the screen unless specified otherwise.
249267
- Changes the screen animation to match the platform behavior for modals.
268+
<video playsInline autoPlay muted loop>
269+
<source src="/assets/7.x/stack/presentation-modal.mp4" />
270+
</video>
271+
250272
- `transparentModal`: Similar to `modal`. This changes following things:
251273
- Sets `headerMode` to `screen` for the screen unless specified otherwise.
252274
- Sets background color of the screen to transparent, so previous screen is visible
253275
- Adjusts the `detachPreviousScreen` option so that the previous screen stays rendered.
254276
- Prevents the previous screen from animating from its last position.
255277
- Changes the screen animation to a vertical slide animation.
278+
279+
See [Transparent modals](#transparent-modals) for more details on how to customize `transparentModal`.
280+
281+
<video playsInline autoPlay muted loop>
282+
<source src="/assets/7.x/stack/presentation-transparentModal.mp4" />
283+
</video>
284+
256285

257-
See [Transparent modals](#transparent-modals) for more details on how to customize `transparentModal`.
258286

259287
#### `animationTypeForReplace`
260288

261289
The type of animation to use when this screen replaces another screen. It takes the following values:
262290

263-
- `push` - The animation of a new screen being pushed will be used
264-
- `pop` - The animation of a screen being popped will be used
291+
- `push` - (default) The animation of a new screen being pushed will be used
292+
<video playsInline autoPlay muted loop>
293+
<source src="/assets/7.x/stack/animationTypeForReplace-push.mp4" />
294+
</video>
265295

266-
Defaults to `push`.
296+
- `pop` - The animation of a screen being popped will be used
297+
<video playsInline autoPlay muted loop>
298+
<source src="/assets/7.x/stack/animationTypeForReplace-pop.mp4" />
299+
</video>
267300

268301
When `pop` is used, the `pop` animation is applied to the screen being replaced.
269302

@@ -415,7 +448,14 @@ return (
415448
Specifies how the header should be rendered:
416449

417450
- `float` - Render a single header that stays at the top and animates as screens are changed. This is default on iOS.
451+
<video playsInline autoPlay muted loop>
452+
<source src="/assets/7.x/stack/headerMode-float.mp4" />
453+
</video>
454+
418455
- `screen` - Each screen has a header attached to it and the header fades in and out together with the screen. This is default on other platforms.
456+
<video playsInline autoPlay muted loop>
457+
<source src="/assets/7.x/stack/headerMode-screen.mp4" />
458+
</video>
419459

420460
#### `headerShown`
421461

@@ -433,6 +473,18 @@ Accessibility label for the header back button.
433473

434474
Function which returns a React Element to display custom image in header's back button. When a function is used, it receives the `tintColor` in it's argument object. Defaults to Image component with back image source, which is the default back icon image for the platform (a chevron on iOS and an arrow on Android).
435475

476+
<img src="/assets/7.x/stack/headerBackImage.png" width="500" alt="Header back image" />
477+
478+
```js
479+
headerBackImage: ({ tintColor }) => (
480+
<Ionicons
481+
tyle={{ color: tintColor }}
482+
size={26}
483+
name="arrow-back-circle"
484+
/>
485+
),
486+
```
487+
436488
#### `headerBackTitle`
437489

438490
Title string used by the back button on iOS. Defaults to the previous scene's title. Use `headerBackButtonDisplayMode` to customize the behavior.

0 commit comments

Comments
 (0)