mirror of
https://github.com/rio-labs/rio.git
synced 2026-01-06 05:09:43 -06:00
add auto_focus parameter (and refactor TS)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ComponentBase, ComponentState } from "./componentBase";
|
||||
import { ComponentBase, ComponentState, DeltaState } from "./componentBase";
|
||||
import { Color } from "../dataModels";
|
||||
import { colorToCssString } from "../cssUtils";
|
||||
|
||||
@@ -9,9 +9,7 @@ export type NodeInputState = ComponentState & {
|
||||
key: string;
|
||||
};
|
||||
|
||||
export class NodeInputComponent extends ComponentBase {
|
||||
declare state: Required<NodeInputState>;
|
||||
|
||||
export class NodeInputComponent extends ComponentBase<NodeInputState> {
|
||||
textElement: HTMLElement;
|
||||
circleElement: HTMLElement;
|
||||
|
||||
@@ -39,7 +37,7 @@ export class NodeInputComponent extends ComponentBase {
|
||||
}
|
||||
|
||||
updateElement(
|
||||
deltaState: NodeInputState,
|
||||
deltaState: DeltaState<NodeInputState>,
|
||||
latentComponents: Set<ComponentBase>
|
||||
): void {
|
||||
super.updateElement(deltaState, latentComponents);
|
||||
|
||||
Reference in New Issue
Block a user