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

zendeskgarden / react-components / 13975845329

20 Mar 2025 05:41PM UTC coverage: 95.503%. First build
13975845329

Pull #2009

github

web-flow
Merge 73aefd4c8 into 613f9a40e
Pull Request #2009: fix(forms): remove `renderToString` for the calendar picker icon

3542 of 3966 branches covered (89.31%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

9731 of 9932 relevant lines covered (97.98%)

235.14 hits per line

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

75.0
/packages/draggable/src/utils/useDropzoneContext.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 IDropzoneContext {
11
  isVertical?: boolean;
12
  isDanger?: boolean;
13
  hasIcon?: boolean;
14
  setHasIcon?: (hasIcon: boolean) => void;
15
  hasMessage?: boolean;
16
  setHasMessage?: (hasMessage: boolean) => void;
17
}
18

19
export const DropzoneContext = createContext<IDropzoneContext | undefined>(undefined);
24✔
20

21
export const useDropzoneContext = () => {
28✔
22
  const context = useContext(DropzoneContext);
28✔
23

24
  if (context === undefined) {
28!
25
    throw new Error('This component must be rendered within a Dropzone component');
×
26
  }
27

28
  return context;
28✔
29
};
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