ReactBricksContext
The ReactBricksContext
provides configuration context to all the children components.
It has the following TypeScript interface:
interface IReactBricksContext { appId: string apiKey: string bricks: Bricks pageTypes: IPageType[] logo: string contentClassName: string renderLocalLink: RenderLocalLink navigate: (path: string) => void loginPath: string editorPath: string playgroundPath: string appSettingsPath: string isDarkColorMode?: boolean toggleColorMode?: () => void useCssInJs?: boolean}
The <ReactBricks>
component wraps all the children with the ReactBricksContext Provider.
If you need any of this configuration settings in your components, you may use React useContext
to access them.