/** * Copyright IBM Corp. 2016, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import PropTypes from 'prop-types'; import React, { ElementType } from 'react'; import { PolymorphicProps } from '../../types/common'; export interface GlobalThemeProps { theme?: 'white' | 'g10' | 'g90' | 'g100'; children?: React.ReactNode; } export declare const ThemeContext: React.Context; export declare const GlobalTheme: React.ForwardRefExoticComponent>; type ThemeBaseProps = GlobalThemeProps & { className?: string; }; type ThemeProps = PolymorphicProps; /** * Specify the theme to be applied to a page, or a region in a page */ export declare function Theme({ as: BaseComponent, className: customClassName, theme, ...rest }: ThemeProps): import("react/jsx-runtime").JSX.Element; export declare namespace Theme { var propTypes: { /** * Specify a custom component or element to be rendered as the top-level * element in the component */ as: PropTypes.Requireable any) | PropTypes.ReactComponentLike | null | undefined>>; /** * Provide child elements to be rendered inside of `Theme` */ children: PropTypes.Requireable; /** * Provide a custom class name to be used on the outermost element rendered by * the component */ className: PropTypes.Requireable; /** * Specify the theme */ theme: PropTypes.Requireable; }; } /** * Get access to the current theme */ export declare function useTheme(): GlobalThemeProps; export declare function usePrefersDarkScheme(): boolean; export {};