• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zendeskgarden / react-components / 11298062083

11 Oct 2024 07:16PM UTC coverage: 95.904%. First build
11298062083

Pull #1941

github

web-flow
Merge 44948d1fe into aae638ccb
Pull Request #1941: chore(deps): update non-major shared dependencies

3322 of 3685 branches covered (90.15%)

Branch coverage included in aggregate %.

9908 of 10110 relevant lines covered (98.0%)

242.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/packages/draggable/src/utils/useDraggableListContext.ts
1
/**
2
 * Copyright Zendesk, Inc.
3
 *
4
 * Use of this source code is governed under the Apache License, Version 2.0
5
 * found at http://www.apache.org/licenses/LICENSE-2.0.
6
 */
7

8
import { createContext, useContext } from 'react';
1✔
9

10
export interface IDraggableListContext {
11
  isHorizontal?: boolean;
12
}
13

14
export const DraggableListContext = createContext<IDraggableListContext | undefined>(undefined);
8✔
15

16
export const useDraggableListContext = () => {
10✔
17
  const context = useContext(DraggableListContext);
10✔
18

19
  if (context === undefined) {
10!
20
    throw new Error('This component must be rendered within a DraggableList component');
×
21
  }
22

23
  return context;
10✔
24
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc