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/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -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
|
-
|
|
92
|
+
{label}
|
|
90
93
|
</>
|
|
91
94
|
)}
|
|
92
95
|
{children}
|