/** * Copyright IBM Corp. 2024, 2025 * * 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, { ReactNode, type JSX } from 'react'; export interface FeatureFlagsProps { children?: ReactNode; flags?: Record; defaultPortalTargetBody?: boolean; enableDatagridUseInlineEdit?: boolean; enableDatagridUseEditableCell?: boolean; enableDatagridUseCustomizeColumns?: boolean; enableSidepanelResizer?: boolean; enableTestFlagA?: boolean; enableTestFlagB?: boolean; } /** * Our FeatureFlagContext is used alongside the FeatureFlags component to enable * or disable feature flags in a given React tree */ declare const FeatureFlagContext: React.Context; /** * Supports an object of feature flag values with the `flags` prop, merging them * along with the current `FeatureFlagContext` to provide consumers to check if * a feature flag is enabled or disabled in a given React tree */ declare function FeatureFlags({ children, flags, defaultPortalTargetBody, enableDatagridUseInlineEdit, enableDatagridUseEditableCell, enableDatagridUseCustomizeColumns, enableSidepanelResizer, enableTestFlagA, enableTestFlagB, }: FeatureFlagsProps): JSX.Element; declare namespace FeatureFlags { var propTypes: { children: PropTypes.Requireable; /** * Provide the feature flags to enabled or disabled in the current React tree */ defaultPortalTargetBody: PropTypes.Requireable; enableDatagridUseCustomizeColumns: PropTypes.Requireable; enableDatagridUseEditableCell: PropTypes.Requireable; enableDatagridUseInlineEdit: PropTypes.Requireable; enableSidepanelResizer: PropTypes.Requireable; enableTestFlagA: PropTypes.Requireable; enableTestFlagB: PropTypes.Requireable; flags: (props: any, propName: any, comp: any, loc: any, propFullName: any, secret: any) => any; }; } /** * Access whether a given flag is enabled or disabled in a given * FeatureFlagContext * * @returns {boolean} */ declare function useFeatureFlag(flag: any): any; /** * Access all feature flag information for the given FeatureFlagContext * * @returns {FeatureFlagScope} */ declare function useFeatureFlags(): any; export { FeatureFlags, FeatureFlagContext, useFeatureFlags, useFeatureFlag }; //# sourceMappingURL=index.d.ts.map