dce-reactkit 4.1.3 → 4.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  type Props = {
7
7
  filename: string;
8
8
  csv: string;
9
+ label?: string;
9
10
  id?: string;
10
11
  className?: string;
11
12
  ariaLabel?: string;
package/dist/index.d.ts CHANGED
@@ -543,6 +543,7 @@ declare const IntelliTable: React$1.FC<Props$7>;
543
543
  type Props$6 = {
544
544
  filename: string;
545
545
  csv: string;
546
+ label?: string;
546
547
  id?: string;
547
548
  className?: string;
548
549
  ariaLabel?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -20,6 +20,8 @@ type Props = {
20
20
  filename: string,
21
21
  // The contents of the CSV file to download
22
22
  csv: string,
23
+ // Label for the button
24
+ label?: string,
23
25
  // Id of the button
24
26
  id?: string,
25
27
  // Class name of the button
@@ -55,6 +57,7 @@ const CSVDownloadButton: React.FC<Props> = (props) => {
55
57
  style,
56
58
  onClick,
57
59
  children,
60
+ label = 'Download CSV',
58
61
  } = props;
59
62
 
60
63
  /*------------------------------------------------------------------------*/
@@ -86,7 +89,7 @@ const CSVDownloadButton: React.FC<Props> = (props) => {
86
89
  icon={faCloudDownloadAlt}
87
90
  />
88
91
  {' '}
89
- Download CSV
92
+ {label}
90
93
  </>
91
94
  )}
92
95
  {children}
@@ -59,6 +59,7 @@ const genCSV = (
59
59
  if (
60
60
  typeof cell === 'string'
61
61
  || typeof cell === 'number'
62
+ || typeof cell === 'boolean'
62
63
  ) {
63
64
  contents = String(cell);
64
65
  } else if (cell === null) {