

A custom hook that locks and unlocks scroll.

## Usage [#usage]

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

// Lock the scroll when the modal is mounted, and unlock it when it's unmounted
useScrollLock()
```

## API [#api]

### Signature [#signature]

```ts
declare function useScrollLock(options?: UseScrollLockOptions): UseScrollLockReturn;
```

### Parameters [#parameters]

| Parameter   | Type                   | Description                                                                      | Default |
| ----------- | ---------------------- | -------------------------------------------------------------------------------- | ------- |
| `[options]` | `UseScrollLockOptions` | Options to configure the hook, by default it will lock the scroll automatically. | -       |

### Return Value [#return-value]

| Value    | Type                  | Description                                           |
| -------- | --------------------- | ----------------------------------------------------- |
| `return` | `UseScrollLockReturn` | - An object containing the lock and unlock functions. |
