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/esm/index.js CHANGED
@@ -3925,7 +3925,8 @@ const genCSV = (data, columns) => {
3925
3925
  let contents;
3926
3926
  const cell = datum[column.param];
3927
3927
  if (typeof cell === 'string'
3928
- || typeof cell === 'number') {
3928
+ || typeof cell === 'number'
3929
+ || typeof cell === 'boolean') {
3929
3930
  contents = String(cell);
3930
3931
  }
3931
3932
  else if (cell === null) {
@@ -3961,7 +3962,7 @@ const CSVDownloadButton = (props) => {
3961
3962
  /*------------------------------------------------------------------------*/
3962
3963
  /* -------------- Props ------------- */
3963
3964
  // Destructure all props
3964
- const { filename, csv, id, className, ariaLabel, style, onClick, children, } = props;
3965
+ const { filename, csv, id, className, ariaLabel, style, onClick, children, label = 'Download CSV', } = props;
3965
3966
  /*------------------------------------------------------------------------*/
3966
3967
  /* ------------------------------- Render ------------------------------- */
3967
3968
  /*------------------------------------------------------------------------*/
@@ -3975,7 +3976,7 @@ const CSVDownloadButton = (props) => {
3975
3976
  !children && (React__default.createElement(React__default.Fragment, null,
3976
3977
  React__default.createElement(FontAwesomeIcon, { icon: faCloudDownloadAlt }),
3977
3978
  ' ',
3978
- "Download CSV")),
3979
+ label)),
3979
3980
  children));
3980
3981
  };
3981
3982