mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 08:20:02 +02:00
adds number object types to NumberComponent
This commit is contained in:
parent
53f4cf6690
commit
e643dd6f5c
@ -8,6 +8,29 @@ import { LevelName } from './NotificationsComponent';
|
|||||||
|
|
||||||
// TODO: add button functionality
|
// 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 {
|
interface NumberComponentProps {
|
||||||
name: string;
|
name: string;
|
||||||
type: 'float' | 'int';
|
type: 'float' | 'int';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user