

Custom hook that handles click events anywhere on the document.

## Usage [#usage]

```tsx
import { useClickAnyWhere } from "@tilt-legal/cubitt-components/utilities/hooks";

const handleClick = (event) => {
  console.log('Document clicked!', event);
};

// Attach click event handler to document
useClickAnywhere(handleClick);
```

## API [#api]

### Signature [#signature]

```ts
declare function useClickAnyWhere(handler: (event: MouseEvent) => void): void;
```

### Parameters [#parameters]

| Parameter | Type       | Description                                                                        | Default |
| --------- | ---------- | ---------------------------------------------------------------------------------- | ------- |
| `handler` | `Function` | The function to be called when a click event is detected anywhere on the document. | -       |

### Return Value [#return-value]

| Value    | Type   | Description                 |
| -------- | ------ | --------------------------- |
| `return` | `void` | Value returned by the hook. |
