import { type ObservableMaybe } from 'woby'; /** * A hook for locking the body scroll. * * @param initialLocked - Whether the body should be initially locked * @returns An observable boolean representing the lock state * * @example * ```tsx * const locked = useLockedBody(true) * * return ( *
Body is {() => $$(locked) ? 'locked' : 'unlocked'}
* *