@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
22 lines (17 loc) • 672 B
JavaScript
'use client';
import * as React from 'react';
/**
* Data for a single type, including the processed type metadata and its anchor href.
*/
/**
* Data for a single type property, including the processed property and its anchor href.
*/
export const TypesDataContext = /*#__PURE__*/React.createContext(undefined);
/**
* Returns the TypesDataContext value, or undefined if not within a provider.
* Used internally by `useTypes` to register types and by `useType` to look up types.
*/
if (process.env.NODE_ENV !== "production") TypesDataContext.displayName = "TypesDataContext";
export function useTypesDataContext() {
return React.useContext(TypesDataContext);
}