✈️ migrate to babel STAGE-3
This commit is contained in:
parent
42b5517e61
commit
298ca64675
15 changed files with 4543 additions and 13 deletions
23
sample-site/README.md
Normal file
23
sample-site/README.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Overview :
|
||||
|
||||
This is a sample website built with React. It aimes to prove the feature of this package in the client side (browser).
|
||||
|
||||
# Run the sample :
|
||||
|
||||
```bash
|
||||
|
||||
git clone https://github.com/abdennour/react-csv.git ;
|
||||
cd react-csv;
|
||||
npm install;
|
||||
npm run start;
|
||||
|
||||
```
|
||||
|
||||
Then , navigate to :
|
||||
|
||||
[http://localhost:8008/](http://localhost:8008/)
|
||||
|
||||
```
|
||||
...running 🏃🏿 🏃🏻
|
||||
🌏 Listening at http://localhost:8008 👏 👏 👌
|
||||
```
|
||||
18
sample-site/index.html
Normal file
18
sample-site/index.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<title>react-csv</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="description" content="Still under development. It is not yet mature. Thank you for your understanding!">
|
||||
<meta name="keywords" content="es7,react-csv,react,csv">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
<!-- vendors -->
|
||||
<script src="bundle.js" type="text/javascript"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
26
sample-site/src/app.jsx
Normal file
26
sample-site/src/app.jsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import React from 'react';
|
||||
import {CSVLink, CSVDownload} from 'react-csv';
|
||||
|
||||
const csvData =[
|
||||
['firstname', 'lastname', 'email'] ,
|
||||
['Ahmed', 'Tomi' , 'ah@smthing.co.com'] ,
|
||||
['Raed', 'Labes' , 'rl@smthing.co.com'] ,
|
||||
['Yezzi','Min l3b', 'ymin@cocococo.com']
|
||||
];
|
||||
|
||||
class App extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div style={{padding: 10}}>
|
||||
<h1>react-csv</h1>
|
||||
<div>
|
||||
|
||||
Download CSV <CSVLink data={csvData}> here </CSVLink>.
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
5
sample-site/src/boot.jsx
Normal file
5
sample-site/src/boot.jsx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './app';
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('app'));
|
||||
2
sample-site/style.css
Normal file
2
sample-site/style.css
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue