DiaryCard.NoData
The DiaryCard.NoData component displays a localized message indicating that no measurement data is available. It provides consistent empty state messaging for diary cards with internationalization support and theme-aware styling.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
The DiaryCard.NoData component displays a localized message indicating that no measurement data is available. It provides consistent empty state messaging for diary cards with internationalization support and theme-aware styling.
Basic Example
import { MeasurementTypeKey } from "@ovok/core/next";
import { DiaryCard } from "@ovok/native";
import * as React from "react";
const BasicDiaryCardNoDataExample = () => {
return <DiaryCard.NoData />;
};
export default BasicDiaryCardNoDataExample;Props
Every prop, with its type and description, is listed in the @ovok/native/diary API reference.
Localization
The component uses the "diary.no-data" translation key. Ensure this key is defined in your translation files:
{
"diary": {
"no-data": "No data recorded"
}
}Theme Integration
- Text Color: Uses
theme.colors.onSurfaceDisabledfor muted appearance - Typography: Custom font family
DMSans_700Boldwith 16px size - Responsive: Adapts to system font size preferences
Visual Design
- Muted Appearance: Subtle styling to indicate absence of data
- Consistent Typography: Matches other secondary text in the app
- Accessible Contrast: Maintains readable contrast ratios
Styling
Theme Colors Used
theme.colors.onSurfaceDisabled- Text color for muted appearance
Related Components
- DiaryCard - Parent container component
- DiaryCard.StartSection - Header section component
- Tile.MeasuredValue - Counterpart for measured data display
Last updated on
DiaryCard.MeasuredValue
Displays a measured value with unit and timestamp. Inherited from the Tile module and themed for consistency across diary cards.
DiaryCard.StartSection
The DiaryCard.StartSection component provides a horizontal layout container for the header section of diary cards. It manages the placement of icons, labels, and optional right-side content with automatic fallback to an arrow icon when no right content is provided.