Reference · Browser table and SVG
TenkaDrawntype
Something a dressing drew: the element to put on the table, and what to do when the table takes it away again (stop a timer, say).
Import it
import type { TenkaDrawn } from "@johnmorrisdotca/tenka/ui";
Also exported from: @johnmorrisdotca/tenka/dressing
Definition
type TenkaDrawn = {
readonly element: Element;
readonly destroy?: () => void;
};
Members
| Name | Type | Description |
|---|---|---|
element | Element | What goes on the table. |
destroy (optional) | (() => void) | undefined | Called once when the table draws it again or goes. Left out when there is nothing to stop. |
Examples
import type { TenkaDrawn } from "@johnmorrisdotca/tenka/ui";
const value: TenkaDrawn = {element:document.createElement("span")};
console.log(value);