react-admin-base-bootstrap 0.7.2 → 0.7.3
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export default function ExcelExportButton({ name, header, params, map, extra }: {
|
|
1
|
+
export default function ExcelExportButton({ name, header, params, size, map, extra }: {
|
|
2
2
|
name: any;
|
|
3
3
|
header: any;
|
|
4
4
|
params: any;
|
|
5
|
+
size: any;
|
|
5
6
|
map: any;
|
|
6
7
|
extra: any;
|
|
7
8
|
}): JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useExporter } from 'react-admin-base';
|
|
3
3
|
import { Button, Col } from "reactstrap";
|
|
4
|
-
export default function ExcelExportButton({ name, header, params, map, extra }) {
|
|
4
|
+
export default function ExcelExportButton({ name, header, params, size, map, extra }) {
|
|
5
5
|
const [handleExport, loading] = useExporter(header, params, map, extra);
|
|
6
6
|
return React.createElement(Col, null,
|
|
7
|
-
React.createElement(Button, { className: "w-100 d-block", type: "button", size:
|
|
7
|
+
React.createElement(Button, { className: "w-100 d-block", type: "button", size: size, color: "success", outline: true, disabled: !!loading, onClick: () => handleExport(name) }, loading ? React.createElement("i", { className: "fas fa-spin fa-spinner" }) : React.createElement("i", { className: "fas fa-file-excel" })));
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {useExporter} from 'react-admin-base';
|
|
3
3
|
import {Button, Col} from "reactstrap";
|
|
4
4
|
|
|
5
|
-
export default function ExcelExportButton({name, header, params, map, extra}) {
|
|
5
|
+
export default function ExcelExportButton({name, header, params, size, map, extra}) {
|
|
6
6
|
const [ handleExport, loading ] = useExporter(header, params, map, extra);
|
|
7
7
|
|
|
8
|
-
return <Col><Button className="w-100 d-block" type="button" size=
|
|
8
|
+
return <Col><Button className="w-100 d-block" type="button" size={size} color="success" outline disabled={!!loading} onClick={() => handleExport(name)}>
|
|
9
9
|
{loading ? <i className="fas fa-spin fa-spinner"/> : <i className="fas fa-file-excel"/>}
|
|
10
10
|
</Button></Col>
|
|
11
11
|
}
|