pdfkit-table
Advanced tools
Comparing version 0.1.56 to 0.1.57
@@ -26,3 +26,3 @@ // jshint esversion: 6 | ||
// validate | ||
fillColor || (fillColor = 'gray'); | ||
fillColor || (fillColor = 'grey'); | ||
fillOpacity || (fillOpacity = 0.1); | ||
@@ -365,5 +365,5 @@ | ||
// Print all headers | ||
table.headers.forEach(( dataHeader, i) => { | ||
table.headers.forEach( (dataHeader, i) => { | ||
let {label, width, renderer, align} = dataHeader; | ||
let {label, width, renderer, align, headerColor, headerOpacity} = dataHeader; | ||
// check defination | ||
@@ -388,3 +388,3 @@ width = width || columnSizes[i]; | ||
// add background | ||
this.addBackground(rectCell); | ||
this.addBackground(rectCell, headerColor, headerOpacity); | ||
@@ -391,0 +391,0 @@ // write |
{ | ||
"name": "pdfkit-table", | ||
"version": "0.1.56", | ||
"version": "0.1.57", | ||
"description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -215,2 +215,4 @@ # pdfkit-table | ||
- align <code>String</code> | ||
- headerColor <code>String</code> | ||
- headerOpacity <code>Number</code> | ||
- background <code>Object</code> sample: {"color": "grey", "opacity": 0.5} | ||
@@ -235,2 +237,4 @@ - color: <code>String</code> | ||
| **align** | <code>String</code> | left | alignment | | ||
| **headerColor** | <code>String</code> | grey or #BEBEBE | color of header | | ||
| **headerOpacity** | <code>Number</code> | 0.5 | opacity of header | | ||
| **background** | <code>Object</code> | undefined | background of column, sample: {"color": "grey", "opacity": 0.5} | | ||
@@ -374,3 +378,2 @@ | **backgroundColor** | <code>String</code> | undefined | color of column | | ||
- sample with database | ||
- alignment | ||
- verticalLines {Boolean} | ||
@@ -383,8 +386,19 @@ - verticalLinesWidth {Number} | ||
### 0.1.57 | ||
+ header color and opacity | ||
```js | ||
headers: [ | ||
{label:"Name", property:"name", headerColor:"#FF0000", headerOpacity:0.5 } | ||
] | ||
``` | ||
- Thanks ***Albert Taveras*** @itsalb3rt | ||
### 0.1.55 | ||
+ align on headers | ||
```json | ||
"headers": [ | ||
{"label":"Name", "property":"name", "align":"center"} | ||
```js | ||
headers: [ | ||
{label:"Name", property:"name", align:"center"} | ||
] | ||
@@ -391,0 +405,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33722
534