@bitcobblers/wod-wiki-library
Version:
A specialized markdown-like workout syntax editor and runtime for defining workouts
16 lines (15 loc) • 722 B
TypeScript
import { RuntimeMetricEdit } from '../../core/RuntimeMetricEdit';
import { MetricValue } from '../../core/MetricValue';
import { default as React } from 'react';
export type MetricType = 'repetitions' | 'resistance' | 'distance';
interface EditableMetricCellProps {
blockKey: string;
index: number;
initialValue?: MetricValue;
metricType: MetricType;
onSave: (update: RuntimeMetricEdit) => void;
validate?: (newValue: MetricValue, oldValue?: MetricValue) => boolean;
}
export declare function createMetricValidation(units: string[]): (newValue: MetricValue, oldValue?: MetricValue) => boolean;
declare const EditableMetricCell: React.FC<EditableMetricCellProps>;
export default EditableMetricCell;