# tsr-click-outside

> click outside a component based on typescript-react

Latest version **1.0.1** (published 2018-01-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install tsr-click-outside
pnpm add tsr-click-outside
yarn add tsr-click-outside
bun add tsr-click-outside
```

## 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.0.1 |
| Published | 2018-01-03 |
| First published | 2018-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jiaxiang.He |
| Maintainers | hejiaxiang2001 |

## Links

- npm: https://www.npmjs.com/package/tsr-click-outside
- Repository: https://github.com/JiaxiangHe/tsrClickOutside
- Homepage: https://github.com/JiaxiangHe/tsrClickOutside#readme
- Issues: https://github.com/JiaxiangHe/tsrClickOutside/issues
- npm.io page: https://npm.io/package/tsr-click-outside

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^15.6.1
- [react-dom](https://npm.io/package/react-dom.md) ^15.6.1

## Recent versions

- 1.0.1 (latest) — 2018-01-03
- 1.0.0 — 2018-01-02

## README

# tsrClickOutside
detect click outside a component based on Typescript React

# Demo:
```
npm install
npm start
access http://localhost:8080
```
# Usage:
```
import { ClickOutside } from "${your path}";
<ClickOutside wrapperElement="div" className="click-zone" onClickOutside={} onClick={}>
  <div className="demo">
      Inside
  </div>
</ClickOutside>
```
# API
wrapperElement: string, optional, default "div", the wrapper element type for component.  
className:  string, optional, class for component wrapper.  
onClickOutside: fun, optional, the function excute after clikc outside the component.  
onClick:  fun, optional, the function excute after clikc inside the component.

---
_Source: https://npm.io/package/tsr-click-outside · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
