react-csv/src/components/CSVLink.js
abdennour 41d2cd8b9c 🌎 🌍 🌏 initial commit
2016-11-25 15:59:50 +03:00

23 lines
511 B
JavaScript

import React from 'react';
import {buildURI} from '../core';
import {defaultProps, PropTypes, PropsNotForwarded} from '../metaProps';
class CSVLink extends React.Component {
constructor(props) {
super(props);
}
render(){
return (
<a {...this.props} href={buildURI(this.props.data, this.props)}>
{this.props.children}
</a>
)
}
}
CSVLink.defaultProps = defaultProps;
CSVLink.PropTypes = PropTypes;
CSVLink.PropsNotForwarded = PropsNotForwarded;
export default CSVLink;