Upwell

upwell/ui

Themeable components for every update state, plus the dev menu.

import { UpwellUI, UpdatePrompt, ForceUpdateScreen, WhatsNew, UpwellThemeProvider } from 'upwell/ui';

Every component reads the current decision from the nearest UpwellProvider and renders nothing when it doesn't apply. They use React Native's Animated and Modal, with no Reanimated or other dependencies.

UpwellUI

Renders whichever component the current decision needs. Place it once, as the last child of your root.

<UpwellUI bottomOffset={insets.bottom + 16} />

Prop

Type

Components

ComponentShown forProps
UpdatePromptstore.recommended: title, body, "Release notes" (when releaseNotesUrl is set), "Later", "Update"bottomOffset, style
DownloadProgressBannerstore.downloading (not required)bottomOffset, style
RestartSnackbarstore.readyToInstall, and ota.ready with applyMode: "prompt", until dismissedbottomOffset, style
ForceUpdateScreenstore.required, and required downloads (with progress). Full-screen modal; the Android back button does nothingstyle
UpdatedSheetOnce after an OTA update with a releases.json entry was appliedstyle
WhatsNewAlways: the release history for the running runtime, as a FlatListstyle, showTitle (default true)
UpwellDevMenuDev tool: a button per simulation scenario, "real device", and the live tracestyle, scenarios

WhatsNew

export function WhatsNewScreen() {
  return <WhatsNew style={{ flex: 1 }} showTitle={false} />;
}

Shows "No updates yet for this version." when the history is empty.

UpwellDevMenu

<UpwellDevMenu style={{ flex: 1 }} scenarios={['store.recommended', 'store.required', 'stranded']} />

scenarios defaults to every simulation scenario.

Theming

Export
UpwellThemeProviderProps: theme, light, dark, scheme. See Theming
useUpwellTheme()The active UpwellTheme
lightTheme, darkTheme, defaultStringsThe defaults
UpwellTheme, UpwellThemeOverride, UpwellColors, UpwellStringsTypes

Primitives

The building blocks the kit is made of, for your own screens:

ExportProps
UpwellButtontitle, onPress, variant ('primary' | 'secondary'), busy, testID, style
UpwellTextvariant ('title' | 'body' | 'muted'), style, numberOfLines, children
ProgressBarprogress (0–1, or null for indeterminate), testID

Test IDs

For your own tests (Jest, Detox, Maestro):

testIDElement
upwell-update-promptUpdatePrompt
upwell-prompt-update, upwell-prompt-laterIts buttons
upwell-download-banner, upwell-download-progressDownloadProgressBanner and its bar
upwell-restart-snackbarRestartSnackbar
upwell-restart, upwell-restart-laterIts buttons
upwell-force-update, upwell-force-update-buttonForceUpdateScreen and its button
upwell-updated-sheet, upwell-updated-dismissUpdatedSheet and its button
upwell-whats-newWhatsNew
upwell-sim-<scenario>UpwellDevMenu scenario buttons

On this page