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.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
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.
Basic Example
import { MeasurementTypeKey } from "@ovok/core/next";
import { DiaryCard } from "@ovok/native";
import * as React from "react";
const BasicDiaryCardStartSectionExample = () => {
return (
<DiaryCard.StartSection
left={() => (
<DiaryCard.TaskIcon
measurementTypeKey={MeasurementTypeKey.bloodPressure}
/>
)}
/>
);
};
export default BasicDiaryCardStartSectionExample;Props
Every prop, with its type and description, is listed in the @ovok/native/diary API reference.
Component Behavior
Icon Integration
- Default Arrow: Uses
ArrowRight2fromiconsax-react-nativejs - Arrow Styling: 20px size with
theme.colors.onSurfaceDisabledcolor - Theme Integration: Arrow color adapts to current theme
Styling
Default Styles
const styles = StyleSheet.create({
container: {
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
},
});Related Components
- DiaryCard - Parent container component
- DiaryCard.NoData - Empty state component
- Tile.TaskIcon - Inherited icon component
Last updated on
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.
DiaryCard.TaskIcon
The DiaryCard.TaskIcon component displays a measurement type icon. It is inherited from the Tile module's TaskIcon and exposed on DiaryCard for convenience.