GuidesComponentsdiary

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 ArrowRight2 from iconsax-react-nativejs
  • Arrow Styling: 20px size with theme.colors.onSurfaceDisabled color
  • Theme Integration: Arrow color adapts to current theme

Styling

Default Styles

const styles = StyleSheet.create({
  container: {
    flexDirection: "row",
    justifyContent: "space-between",
    alignItems: "center",
  },
});

Last updated on

On this page