You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
427 B
JavaScript
16 lines
427 B
JavaScript
import * as React from 'react';
|
|
/**
|
|
* @ignore - internal component.
|
|
*/
|
|
const TabsContext = /*#__PURE__*/React.createContext(null);
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
TabsContext.displayName = 'TabsContext';
|
|
}
|
|
export function useTabsContext() {
|
|
const context = React.useContext(TabsContext);
|
|
if (context == null) {
|
|
throw new Error('No TabsContext provided');
|
|
}
|
|
return context;
|
|
}
|
|
export { TabsContext }; |