HealthImportCard
Presents authorization status and an enable/disable action for the supplied
types and HealthImportAdapter.
<HealthImportCard
types={["steps", "weight"]}
adapter={healthAdapter}
background
labelForType={(type) => labels[type] ?? type}
/>
Props
types: readonly TType[]— app-selected health data types.adapter: HealthImportAdapter<TType>— implementsgetStatus(type)andrequest(types, background).background?: boolean— request flag passed to the adapter.title?: string.labelForType?: (type: TType) => string.progress?: Partial<Record<TType, SyncProgress>>— optional per-type sync progress.statusLabels?: Partial<Record<SyncProgress["status"], string>>.reasonLabels?: Partial<Record<NonNullable<SyncProgress["reason"]>, string>>.testID?: string.theme?andslots?— sharedOvokUiProps.
Adapter statuses are authorized, shouldRequest, refused, and
unsupported. The adapter owns platform authorization and import behavior; the
card does not request a fixed Apple HealthKit or Health Connect type set. The switch's
initial false value is local UI state, not a derived "all requested types are
authorized" state; refresh and persist authorization in the adapter/host when the
screen must reflect existing grants.
Localize labels through labelForType and keep platform permission policy in the
adapter.