UNPKG

427 BJavaScriptView Raw
1import * as React from 'react';
2/**
3 * @ignore - internal component.
4 */
5const TabsContext = /*#__PURE__*/React.createContext(null);
6if (process.env.NODE_ENV !== 'production') {
7 TabsContext.displayName = 'TabsContext';
8}
9export function useTabsContext() {
10 const context = React.useContext(TabsContext);
11 if (context == null) {
12 throw new Error('No TabsContext provided');
13 }
14 return context;
15}
16export { TabsContext };
\No newline at end of file