Skip to content

Commit

Permalink
Fix NeedleEngine tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Sep 26, 2023
1 parent 3b6d0a2 commit a90196e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/NeedleEngine.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "@needle-tools/engine";
import { NeedleEngineAttributes } from "@needle-tools/engine";
import React, { useRef } from 'react'

export function NeedleEngine(props: { children?: React.ReactNode } & NeedleEngineAttributes) {
import React, { ReactElement, useRef } from 'react'
export function NeedleEngine(props: NeedleEngineAttributes | { children?: any }): ReactElement<NeedleEngineAttributes> {
return <needle-engine {...props}>
{props.children}
</needle-engine>;
Expand Down
13 changes: 5 additions & 8 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

declare global {
namespace JSX {
interface IntrinsicElements {
'needle-engine': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
}
}
}
declare namespace JSX {
interface IntrinsicElements {
"needle-engine": any;
}
}

0 comments on commit a90196e

Please sign in to comment.