UNPKG

@atlaskit/app-provider

Version:

A top level provider for the Design System.

44 lines (43 loc) 1.37 kB
import React from 'react'; import type { ThemeColorModes } from '@atlaskit/tokens/theme-color-modes'; import { type RouterLinkComponent } from './router-link-provider'; import { type Theme } from './theme-provider/context/theme'; interface AppProviderProps { /** * Initial color mode. */ defaultColorMode?: ThemeColorModes; /** * Theme settings. */ defaultTheme?: Partial<Theme>; /** * A configured router link component. */ routerLinkComponent?: RouterLinkComponent<any>; /** * Disables theming functionality. * This is intended for use in apps with existing * theming configuration that want to incrementally * adopt AppProvider. * * @warning Use with caution. This prop will be removed in a future release. */ UNSAFE_isThemingDisabled?: boolean; /** * App content. */ children: React.ReactNode; } /** * __App provider__ * * An app provider provides app level configuration such as global theming. * * Place it at the root of your application. */ export declare function AppProvider({ children, defaultColorMode, defaultTheme, routerLinkComponent, UNSAFE_isThemingDisabled, }: AppProviderProps): React.JSX.Element; /** * @deprecated Use `import { AppProvider } from '@atlaskit/app-provider/app-provider'` instead. */ export default AppProvider;