Description
Components for body measurements such as weight.
WeightProgress
Description
A summary of the member's weight: their current weight and their goal. Tapping it opens a sheet where the member enters a new weight or goes on to edit their goal.
Basic usage
{{code.b0}}Props
| Prop | Type | Description |
|---|---|---|
weightProgress (required) | { weightGoal: PlanArtifactWeight | null; weightTracking: WeightTracking | null } | The result of getWeightProgress. |
bodyComposition (required) | BodyComposition | null | The result of getBodyComposition. Required by the props type, which WeightProgress shares with the other body-stats components; WeightProgress itself shows weight only. |
isLoading | boolean | If true, shows the loading state. |
onUpdateWeightTracking | (weightGoal: PlanArtifactWeight) => Promise<void> | Called after the member saves a new weight, with the saved weight entry (despite the parameter name). |
onUpdateWeightGoal | () => void | Called when the member chooses to edit their weight goal. We recommend opening the UserSettings component, where the goal is edited. |