Fix
Some checks failed
Lint / lint (push) Failing after 9s

This commit is contained in:
Julien Valverdé
2026-01-02 12:40:15 +01:00
parent a4508fb053
commit a97afa5dd9
3 changed files with 9 additions and 14 deletions

View File

@@ -3,11 +3,10 @@ import { useState } from "react"
import { Component } from "react-godot-renderer"
const VFlowContainer = Component.make(Godot.VFlowContainer)
const Label = Component.make(Godot.Label)
const TextEdit = Component.make(Godot.TextEdit)
const Button = Component.make(Godot.Button)
const TestUi1Scene = Component.fromScene("res://src/TestUi1.tscn")
const VFlowContainer = Component.fromClass(Godot.VFlowContainer)
const Label = Component.fromClass(Godot.Label)
const TextEdit = Component.fromClass(Godot.TextEdit)
const Button = Component.fromClass(Godot.Button)
export function TestUi1Component() {
const [text, setText] = useState("Default text")
@@ -26,10 +25,6 @@ export function TestUi1Component() {
return (
<VFlowContainer
name="Root"
anchor_left={0}
anchor_top={0}
anchor_right={0}
anchor_bottom={0}
>
<Label
name="Label"

View File

@@ -3,10 +3,10 @@ import { useState } from "react"
import { Component } from "react-godot-renderer"
const HFlowContainer = Component.make(Godot.HFlowContainer)
const VFlowContainer = Component.make(Godot.VFlowContainer)
const Label = Component.make(Godot.Label)
const CheckBox = Component.make(Godot.CheckBox)
const HFlowContainer = Component.fromClass(Godot.HFlowContainer)
const VFlowContainer = Component.fromClass(Godot.VFlowContainer)
const Label = Component.fromClass(Godot.Label)
const CheckBox = Component.fromClass(Godot.CheckBox)
const TestUi1FC = Component.fromScene("res://src/TestUi1.tscn")
export function TestUi2Component() {

View File

@@ -27,7 +27,7 @@ export const Prototype: Prototype<any> = {
useUnsafeRef() { return React.useRef(null) },
}
export const make = <T extends Godot.Node<Godot.NodePathMap>>(
export const fromClass = <T extends Godot.Node<Godot.NodePathMap>>(
class_: new (...args: any[]) => T
): Component<T> => Object.setPrototypeOf(
Object.assign(