✈️ migrate to babel STAGE-3
This commit is contained in:
parent
42b5517e61
commit
298ca64675
15 changed files with 4543 additions and 13 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import React from 'react';
|
||||
import {buildURI} from '../core';
|
||||
import {defaultProps, PropTypes, PropsNotForwarded} from '../metaProps';
|
||||
import XObject from 'x-object/safe';
|
||||
|
||||
class CSVLink extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -14,10 +13,11 @@ class CSVLink extends React.Component {
|
|||
}
|
||||
|
||||
render(){
|
||||
const {data, headers, children , ...rest} = this.props;
|
||||
return (
|
||||
<a {...XObject.filter(this.props, (k, v) => !PropsNotForwarded.includes(k))}
|
||||
href={this.buildURI(this.props.data, this.props.headers)}>
|
||||
{this.props.children}
|
||||
<a {...rest}
|
||||
href={this.buildURI(data, headers)}>
|
||||
{children}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue