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.
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/CSVDownloadButton.d.ts +1 -0
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/CSVDownloadButton.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/CSVDownloadButton.tsx +4 -1
- package/src/helpers/genCSV.ts +1 -0
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
|
-
|
|
3979
|
+
label)),
|
|
3979
3980
|
children));
|
|
3980
3981
|
};
|
|
3981
3982
|
|