-
Notifications
You must be signed in to change notification settings - Fork 0
/
canvas.ts
41 lines (39 loc) · 1.51 KB
/
canvas.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @fileoverview
*
* This file was generated. Do not modify this file directly.
*/
import type { AnyProps, GlobalAttributes } from "./lib/mod.ts";
import { renderElement } from "./lib/mod.ts";
/**
* CanvasElementProps are the props for the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/canvas>
*/
export interface CanvasElementProps extends GlobalAttributes {
/**
* `height` is an attribute of the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/canvas#height>
*/
height?: string | undefined;
/**
* `moz-opaque` is an attribute of the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/canvas#moz-opaque>
* @deprecated
*/
"moz-opaque"?: string | undefined;
/**
* `width` is an attribute of the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/canvas#width>
*/
width?: string | undefined;
}
/**
* canvas renders the [`canvas`](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/canvas>
*/
export function canvas(
props?: CanvasElementProps,
...children: string[]
): string {
return renderElement("canvas", props as AnyProps, false, children);
}