@@ -26,7 +26,7 @@ interface TableOptions {
2626 rows? : RowData [];
2727
2828 // Table styling
29- style? : TableStyle | CustomStyle ;
29+ style? : CustomStyle ;
3030
3131 // Sorting function
3232 sort? : (row1 : RowData , row2 : RowData ) => number ;
@@ -72,8 +72,8 @@ const table = new Table({
7272 { id: 2 , name: " Jane" , age: 30 }
7373 ],
7474
75- // Table styling
76- style: " fatBorder " ,
75+ // Table styling (using default style)
76+ // style: customStyleObject, // Use custom style object if needed
7777 title: " Employee Directory" ,
7878
7979 // Sorting by age in descending order
@@ -396,20 +396,22 @@ const table = new Table({
396396
397397Pre-defined table border styles.
398398
399- ``` typescript
400- type TableStyle = " fatBorder" | " thinBorder" | " noBorder" ;
401- ```
399+ The style property accepts a ` TableStyleDetails ` object or can be omitted to use the default style.
402400
403401** Examples:**
404402``` javascript
405- // Fat border (thick lines)
406- const table = new Table ({ style: " fatBorder" });
407-
408- // Thin border (thin lines)
409- const table = new Table ({ style: " thinBorder" });
410-
411- // No border
412- const table = new Table ({ style: " noBorder" });
403+ // Default border style (will use built-in default style)
404+ const table = new Table ();
405+
406+ // Custom border style
407+ const table = new Table ({
408+ style: {
409+ headerTop: { left: " ┌" , mid: " ┬" , right: " ┐" , other: " ─" },
410+ headerBottom: { left: " ├" , mid: " ┼" , right: " ┤" , other: " ─" },
411+ tableBottom: { left: " └" , mid: " ┴" , right: " ┘" , other: " ─" },
412+ vertical: " │"
413+ }
414+ });
413415```
414416
415417## Function Signatures
0 commit comments