adds number object types to NumberComponent

This commit is contained in:
Mose Müller 2023-12-13 10:34:32 +01:00
parent 53f4cf6690
commit e643dd6f5c

View File

@ -8,6 +8,29 @@ import { LevelName } from './NotificationsComponent';
// TODO: add button functionality
export type QuantityObject = {
type: 'Quantity';
readonly: boolean;
value: {
magnitude: number;
unit: string;
};
doc?: string;
};
export type IntObject = {
type: 'int';
readonly: boolean;
value: number;
doc?: string;
};
export type FloatObject = {
type: 'float';
readonly: boolean;
value: number;
doc?: string;
};
export type NumberObject = IntObject | FloatObject | QuantityObject;
interface NumberComponentProps {
name: string;
type: 'float' | 'int';