import { Cell } from "https://deno.land/x/cliffy@v1.0.0-rc.7/table/cell.ts";
Cell representation.
Can be used to customize a single cell.
import { Cell, Table } from "./mod.ts";
new Table()
.body([
["Foo", new Cell("Bar").align("right")],
["Beep", "Boop"],
])
.render();
Constructors
new
Cell(value: CellValue)Cell constructor.
Methods
border(enable?, override?): this
Enable/disable cell border.
colSpan(span: number, override?): this
Set col span.
import { Cell, Table } from "./mod.ts";
new Table()
.body([
[
new Cell("Row 1 & 2 Column 1").rowSpan(2),
"Row 1 Column 2",
"Row 1 Column 3",
],
[new Cell("Row 2 Column 2 & 3").colSpan(2)],
])
.border()
.render();
getBorder(): boolean
Check if cell has border.
getColSpan(): number
Get col span.
getRowSpan(): number
Get row span.
rowSpan(span: number, override?): this
Set row span.
import { Cell, Table } from "./mod.ts";
new Table()
.body([
[
new Cell("Row 1 & 2 Column 1").rowSpan(2),
"Row 1 Column 2",
"Row 1 Column 3",
],
[new Cell("Row 2 Column 2 & 3").colSpan(2)],
])
.border()
.render();
toString(): string
Get cell string value.