File tree Expand file tree Collapse file tree 1 file changed +14
-32
lines changed
Expand file tree Collapse file tree 1 file changed +14
-32
lines changed Original file line number Diff line number Diff line change 1- import { CSSProperties } from "react" ;
21import { UnityProvider } from "./unity-provider" ;
32import { UnityArguments } from "./unity-arguments" ;
3+ import { CanvasHTMLAttributes , DetailedHTMLProps } from "react" ;
4+
5+ type HTMLCanvasElementProps = DetailedHTMLProps <
6+ CanvasHTMLAttributes < HTMLCanvasElement > ,
7+ HTMLCanvasElement
8+ > ;
49
510type UnityProps = Pick <
611 UnityArguments ,
712 "devicePixelRatio" | "matchWebGLToCanvasSize" | "disabledCanvasEvents"
8- > & {
9- /**
10- * The Unity provider that contains the necessary URLs to load the Unity
11- * instance. This is required to load the Unity WebGL build.
12- */
13- unityProvider : UnityProvider ;
14-
15- /**
16- * The ID of the Unity canvas element. If not provided, a unique ID will be
17- * generated. It is recommended to let the library generate a unique ID
18- * unless you have a specific reason to use a custom ID.
19- */
20- id ?: string ;
21-
22- /**
23- * The style of the Unity canvas element.
24- */
25- style ?: CSSProperties ;
26-
27- /**
28- * The class name of the Unity canvas element. This can be used to apply
29- * custom styles to the canvas.
30- */
31- className ?: string ;
32-
33- /**
34- * The tab index of the Unity canvas element. This can be used to make the
35- * canvas focusable.
36- */
37- tabIndex ?: number ;
38- } ;
13+ > &
14+ Pick < HTMLCanvasElementProps , "id" | "style" | "className" | "tabIndex" > & {
15+ /**
16+ * The Unity provider that contains the necessary URLs to load the Unity
17+ * instance. This is required to load the Unity WebGL build.
18+ */
19+ unityProvider : UnityProvider ;
20+ } ;
3921
4022export type { UnityProps } ;
You can’t perform that action at this time.
0 commit comments