-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { ImageSourcePropType } from 'react-native'; | ||
|
||
interface SlideImage { | ||
type: 'image'; | ||
image: ImageSourcePropType; | ||
} | ||
|
||
interface SlideTitle { | ||
type: 'title'; | ||
title: string; | ||
} | ||
|
||
interface SlideDescription { | ||
type: 'description'; | ||
description: string; | ||
} | ||
|
||
type SlideButtonType = 'normal' | 'blue'; | ||
|
||
interface SlideButton { | ||
type: 'button'; | ||
buttonType: SlideButtonType; | ||
buttonText: string; | ||
onPress: (props: { navigation: any }) => void; | ||
} | ||
|
||
type SlideContentType = | ||
| SlideImage | ||
| SlideTitle | ||
| SlideDescription | ||
| SlideButton; | ||
|
||
type WhatsNewSlides = SlideContentType[][]; | ||
|
||
export interface WhatsNew { | ||
onlyUpdates: boolean; | ||
maxLastAppVersion: string; | ||
minAppVersion: string; | ||
/** | ||
* Slides utilizes a templating system in the form of a 2D array, which is eventually rendered within app/components/UI/WhatsNewModal/index.js. | ||
* The root layer determines the number of slides. Ex. To display 3 slides, the root layer should contain 3 arrays. | ||
* The inner layer determines the content that will be rendered within each slide. | ||
* The slide content takes the form of union types, where the possible types are `image`, `title`, `description`, or `button`. | ||
* Both slide count and slide content will be rendered in the same order as the data set. | ||
*/ | ||
slides: WhatsNewSlides; | ||
} |
File renamed without changes.