An open API service indexing awesome lists of open source software.

https://github.com/axetroy/react-download

react component for click and then download the specify content file.
https://github.com/axetroy/react-download

download react react-component react-download

Last synced: over 1 year ago
JSON representation

react component for click and then download the specify content file.

Awesome Lists containing this project

README

          

# react-download

react component for click and then download the specify content file.

[Online Demo](https://axetroy.github.io/react-download/)

### Installation

```bash
npm install @axetroy/react-download
```

### Usage

```javascript
import React from 'react';
import { render } from 'react-dom';
import Download from '@axetroy/react-download';

const element = document.createElement('div');
document.body.appendChild(element);

class App extends React.Component {
render() {
return (



Click and Download file


);
}
}

render(, element);
```

### Props

- file

download file name

- content

the file content you want to download

### Run the Demo

```bash
git clone https://github.com/axetroy/react-download.git
yarn
yarn start
```

### License

The [MIT License](https://github.com/axetroy/react-download/blob/master/LICENSE)