UNPKG

@asgardeo/react

Version:
51 lines (50 loc) 1.65 kB
/** * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import { FC, PropsWithChildren } from 'react'; export interface FlowMetaProviderProps { /** * When false the provider skips fetching and provides null meta. * @default true */ enabled?: boolean; } /** * FlowMetaProvider fetches flow metadata from the `GET /flow/meta` endpoint * (v2 API) and makes it available to child components through `FlowMetaContext`. * * It is designed to be used in v2 embedded-flow scenarios and integrates with * `ThemeProvider` so that theme settings (colors, direction, typography, …) * from the server-side design configuration are applied automatically. * * @example * ```tsx * <FlowMetaProvider * config={{ * baseUrl: 'https://localhost:8090', * type: FlowMetaType.App, * id: 'your-app-id', * }} * > * <ThemeProvider> * <App /> * </ThemeProvider> * </FlowMetaProvider> * ``` */ declare const FlowMetaProvider: FC<PropsWithChildren<FlowMetaProviderProps>>; export default FlowMetaProvider;