@connectv/marked
Version:
component-based markdown renderer
21 lines • 851 B
JavaScript
export function Table(props, renderer) {
return renderer.create("table", null,
renderer.create("thead", null, props.header /* istanbul ignore next */ || ''),
renderer.create("tbody", null, props.body /* istanbul ignore next */ || ''));
}
export function TableRow(_, renderer, content) {
return renderer.create("tr", null, content);
}
export function TableHeaderCell(props, renderer, content) {
if (props.align)
return renderer.create("th", { style: `text-align: ${props.align}` }, content);
else
return renderer.create("th", null, content);
}
export function TableCell(props, renderer, content) {
if (props.align)
return renderer.create("td", { style: `text-align: ${props.align}` }, content);
else
return renderer.create("td", null, content);
}
//# sourceMappingURL=table.js.map