UpdatePrompt
A modal offering an optional (non-mandatory) update. Appears automatically when an update is available; "Update" downloads it, "Later" suppresses re-prompts for that update id.
Import
import { UpdatePrompt } from '@sigx/lynx-updates-ui';
Usage
Drop <UpdatePrompt> anywhere inside your tree. It shows automatically when the headless state reaches status: 'available' with mandatory: false, unless the user already dismissed this update id. It shows manifest.version and manifest.metadata?.releaseNotes.
import { UpdatePrompt } from '@sigx/lynx-updates-ui';
// Download now, apply on the next cold launch (default).
<UpdatePrompt applyOn="next-launch" />
- Update →
Updates.download(); withapplyOn="restart"it thenUpdates.apply()s immediately (in-place reload). The default'next-launch'leaves the staged update for the next cold start (pair it withUpdateReadyBannerto offer an immediate restart). - Later → dismisses and suppresses re-prompts for that update id (persisted via
@sigx/lynx-storage, key__sigx_updates_dismissed:<id>), and firesonDismiss.
Mandatory updates never prompt — UpdateGate owns those.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
applyOn | 'restart' | 'next-launch' | 'next-launch' | When the downloaded update takes effect after "Update". |
title | string | 'Update available' | Modal headline. |
class | string | — | Extra class for the modal box. |
Events
| Event | Payload | Description |
|---|---|---|
onDismiss | () => void | Fired when the user taps "Later" (or the backdrop). |
See the dismissal helpers to read or set dismissals yourself.
