Skip to content

Commit cbbc924

Browse files
author
Coston Perkins
committed
simplify props
1 parent 2072540 commit cbbc924

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var CsvDownload = function CsvDownload(props) {
2626
return _react2.default.createElement(
2727
'button',
2828
_extends({ onClick: function onClick() {
29-
return (0, _jsonToCsvExport2.default)(props.data, props.filename);
29+
return (0, _jsonToCsvExport2.default)(data, filename);
3030
} }, others),
3131
props.children || 'Download Data'
3232
);

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const CsvDownload = props => {
55
const { data, filename, ...others } = props
66

77
return (
8-
<button onClick={() => csvDownload(props.data, props.filename)} {...others}>
8+
<button onClick={() => csvDownload(data, filename)} {...others}>
99
{props.children || 'Download Data'}
1010
</button>
1111
)

0 commit comments

Comments
 (0)