# @mik-a/tiny-uploader

> Customizable React component/button for uploading text files.

Latest version **1.2.3** (published 2020-03-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mik-a/tiny-uploader
pnpm add @mik-a/tiny-uploader
yarn add @mik-a/tiny-uploader
bun add @mik-a/tiny-uploader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2020-03-12 |
| First published | 2020-03-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mik-a |
| Maintainers | mik-a |

## Links

- npm: https://www.npmjs.com/package/@mik-a/tiny-uploader
- Repository: https://github.com/Mik-A/tiny-uploader
- Homepage: https://github.com/Mik-A/tiny-uploader#readme
- Issues: https://github.com/Mik-A/tiny-uploader/issues
- npm.io page: https://npm.io/package/@mik-a/tiny-uploader

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.13.0
- [webpack](https://npm.io/package/webpack.md) ^4.12.0
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.24.1

## Recent versions

- 1.2.3 (latest) — 2020-03-12
- 1.2.2 — 2020-03-12
- 1.2.1 — 2020-03-12
- 1.2.0 — 2020-03-12
- 1.1.0 — 2020-03-10
- 1.0.0 — 2020-03-10
- 0.0.1 — 2020-03-10

## README

# tiny-uploader

Customizable React component/button for uploading text files. 

Works with most common text documents such as .txt and .md

## Installation

`npm i @mik-a/tiny-uploader --save`

## Usage

```jsx
import UploadeTextFile from '@mik-a/tiny-uploader'

<UploadTextFile fileContentHandler={fileContentHandler} fileInfo={fileInfoHandler} label='Upload' className='my-custom-class' />

// Example of functions

  const fileContentHandler = e => {
    console.log('text content: ', e)
  }

  const fileInfoHandler = e => {
    console.log('file info', e)
    // name, lastModified, webkitRelativePath , size , type 
  }

```
## Props

`fileContentHandler` // function()

`FileInfo` // function()

### Optional props

`label` // 'string' - default 'Upload text'

`className` // 'string' - your custom CSS class

## Default CSS
```css
.tiny-uploader {
	border: 1px solid;
	padding: 0.8rem 1.8rem;
	border-radius: 1.8rem;
}

```

## Author
- **Mika Välimäki** - [GitHub profile](https://github.com/Mik-A)
- **Phone** - [+358 50 4088 201](+358504088201)
- **Mika Välimäki** - [LinkedIn](https://www.linkedin.com/in/mika-v%C3%A4lim%C3%A4ki/)

- **GitHub repo** - [tiny-uploader](https://github.com/Mik-A/tiny-uploader)

---
_Source: https://npm.io/package/@mik-a/tiny-uploader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
