@itwin/itwinui-react
Version:
A react component library for iTwinUI
38 lines (37 loc) • 1.26 kB
TypeScript
import * as React from 'react';
export type FutureOptions = {
/**
* @alpha
*
* If enabled, the theme resembles the future iTwinUI version's theme (including alphas) *whenever possible*.
*
* This is useful in making apps looks like future versions of iTwinUI to help with incremental adoption.
*
* **NOTE**: Since this is a theme bridge to *future* versions, the theme could have breaking changes.
*/
themeBridge?: boolean;
ToggleSwitch?: {
/**
* When `true`, `className` and `style` will be applied on the
* input element, along with the rest of the DOM props.
*
* By default (without this flag), `className` and `style` get
* applied on the wrapper element, unless `wrapperProps` is also passed.
*/
consistentPropsSpread?: boolean;
};
};
/**
* Hook to access future flags.
* @private
*
* @example
* ```jsx
* const themeBridge = useFutureFlag('themeBridge');
* ```
*/
export declare function useFutureFlag<K extends keyof FutureOptions>(key: K): FutureOptions[K];
/** @private */
export declare const FutureFlagsProvider: ({ children, value, }: React.PropsWithChildren<{
value: true | FutureOptions;
}>) => React.JSX.Element;