# OutsideClickHandler

A utility component that detects clicks outside of its boundaries.

---

## Installation

```bash
npm install @cleartrip/ct-design-outside-click-handler
# or
pnpm add @cleartrip/ct-design-outside-click-handler
```

### Peer dependencies

```bash
# Required for all targets
npm install react

# Web only
npm install react-dom

# React Native only
npm install react-native
```

---

## Usage

### Basic

```tsx
import { OutsideClickHandler } from '@cleartrip/ct-design-outside-click-handler';

function Example() {
  return (
    <OutsideClickHandler>
      {/* Basic usage */}
    </OutsideClickHandler>
  );
}
```

---

## Accessibility

- The component follows accessibility best practices
- Ensure proper ARIA attributes are provided where needed
- Test with screen readers to ensure usability

---

## Migration

If migrating from a previous version:

```diff
- import { OutsideClickHandler } from 'yagami/core/components';
+ import { OutsideClickHandler } from '@cleartrip/ct-design-outside-click-handler';
```
