GuidesModules

Diary cards

Present diary and measurement summaries with the DiaryCard component

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

Use DiaryCard to present a single diary task or measurement summary with a consistent title, icon, value, and empty state. The module does not load diary data, calculate clinical values, or save entries; provide the values and actions from the screen that owns that workflow.

import { DiaryCard } from "@ovok/native/diary";

<DiaryCard hasData={hasMeasurement} onPress={openDiaryEntry}>
  <DiaryCard.Title>Blood pressure</DiaryCard.Title>
  <DiaryCard.MeasuredValue value="120/80" unit="mmHg" />
</DiaryCard>

Use the NoData state for an item that has no measurement yet. Keep units and formatting tied to the measurement model; the card should not be the place where raw clinical data is converted or interpreted. If tapping the card opens an entry form, route that action in the app.

References

API reference

Every export of @ovok/native/diary, with signatures, props and types, is in the diary API reference.

Last updated on

On this page