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.
Basic Example
import { MeasurementTypeKey } from "@ovok/core";
import { DiaryCard } from "@ovok/native";
import * as React from "react";
const BasicDiaryCardTaskIconExample = () => {
return (
<DiaryCard.TaskIcon measurementTypeKey={MeasurementTypeKey.bodyWeight} />
);
};
export default BasicDiaryCardTaskIconExample;
Props
Extends SVG props via react-native-svg.
Primary Props
| Prop | Type | Default | Description |
|---|---|---|---|
measurementTypeKey | MeasurementTypeKey | required | Key of the measurement type to render |
size | number | 20 | Icon size in px |
color | string | theme.colors.primary | Icon color |
style | StyleProp<ViewStyle> | undefined | Additional style for the SVG |
testID | string | undefined | Test identifier |
Styling
Theme Colors Used
theme.colors.primary- Default icon color whencoloris not provided