UNPKG

prettier-playwright-msteams-report

Version:
57 lines (56 loc) 2.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTableRow = void 0; const createTableRow = (type, total, percentage, options) => { const row = { type: "TableRow", cells: [ { type: "TableCell", items: [ { type: "TextBlock", text: type, wrap: true, }, ], style: (options === null || options === void 0 ? void 0 : options.style) || undefined, }, { type: "TableCell", items: [ { type: "TextBlock", text: `${total}`, wrap: true, }, ], }, { type: "TableCell", items: [ { type: "TextBlock", text: percentage || '', wrap: true, }, ], }, ], }; if (options === null || options === void 0 ? void 0 : options.style) { row.cells[0].style = options.style; } if (options === null || options === void 0 ? void 0 : options.isSubtle) { row.cells[0].items[0].isSubtle = options === null || options === void 0 ? void 0 : options.isSubtle; row.cells[1].items[0].isSubtle = options === null || options === void 0 ? void 0 : options.isSubtle; row.cells[2].items[0].isSubtle = options === null || options === void 0 ? void 0 : options.isSubtle; } if (options === null || options === void 0 ? void 0 : options.weight) { row.cells[0].items[0].weight = options.weight; row.cells[1].items[0].weight = options.weight; row.cells[2].items[0].weight = options.weight; } return row; }; exports.createTableRow = createTableRow;