

Custom hook that handles timeouts in React components using the [`setTimeout API`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout).

## Usage [#usage]

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

// Usage of useTimeout hook
useTimeout(() => {
  // Code to be executed after the specified delay
}, 1000); // Set a timeout of 1000 milliseconds (1 second)
```

## API [#api]

### Signature [#signature]

```ts
declare function useTimeout(callback: () => void, delay: number | null): void;
```

### Parameters [#parameters]

| Parameter  | Type            | Description                                           | Default                                                                             |   |
| ---------- | --------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------- | - |
| `callback` | `() =&gt; void` | The function to be executed when the timeout elapses. | -                                                                                   |   |
| `delay`    | \`number        | null\`                                                | The duration (in milliseconds) for the timeout. Set to `null` to clear the timeout. | - |

### Return Value [#return-value]

| Value    | Type   | Description                         |
| -------- | ------ | ----------------------------------- |
| `return` | `void` | This hook does not return anything. |
