@kiwicom/orbit-components
Version:
<div align="center"> <a href="https://orbit.kiwi" target="_blank"> <img alt="orbit-components" src="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components.png" srcset="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components@2x.png 2x"
22 lines (20 loc) • 1.05 kB
Markdown
# ClickOutside
To implement ClickOutside component into your project you'll need to add the import:
```jsx
import ClickOutside from "@kiwicom/orbit-components/lib/ClickOutside";
```
After adding import into your project you can use it simply like:
```jsx
<ClickOutside onClickOutside={...} >
<div>
Content
</div>
</ClickOutside>
```
## Props
Table below contains all types of the props available in the ClickOutside component.
| Name | Type | Default | Description |
| :-------------- | :------------------------------------------ | :-------------- | :------------------------------- |
| children | `React.Node` | | The content of the ClickOutside to render.
| dataTest | `string` | | Optional prop for testing purposes.
| onClickOutside | `(ev: MouseEvent) => void \| Promise<any>` | | Function for handling onClickOutside event.