@itwin/presentation-components
Version:
React components based on iTwin.js Presentation library
35 lines • 1.24 kB
TypeScript
/** @packageDocumentation
* @module Core
*/
import { PropsWithChildren } from "react";
import { IModelConnection } from "@itwin/core-frontend";
import { SchemaContext } from "@itwin/ecschema-metadata";
/**
* Context that stores metadata related to schemas.
* @public
*/
export interface SchemaMetadataContext {
/** Schema context for schemas lookup. */
schemaContext: SchemaContext;
}
/**
* Props for [[SchemaMetadataContextProvider]]
* @public
*/
export interface SchemaMetadataContextProviderProps {
/** iModel to pull schemas from. */
imodel: IModelConnection;
/** Callback that provides schema context for supplied imodel. */
schemaContextProvider: (imodel: IModelConnection) => SchemaContext;
}
/**
* Provides schema metadata to components that work with schemas.
* @public
*/
export declare function SchemaMetadataContextProvider({ schemaContextProvider, imodel, children }: PropsWithChildren<SchemaMetadataContextProviderProps>): import("react/jsx-runtime").JSX.Element;
/**
* Returns context provided by [[SchemaMetadataContextProvider]].
* @public
*/
export declare function useSchemaMetadataContext(): SchemaMetadataContext | undefined;
//# sourceMappingURL=SchemaMetadataContext.d.ts.map