UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

21 lines 1.49 kB
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import { ButtonContext } from './button-context'; import { CollectionLabelContext } from './collection-label-context'; import { FormFieldContext } from './form-field-context'; import { InfoLinkLabelContext } from './info-link-label-context'; import { defaultValue as linkDefaultValue, LinkDefaultVariantContext } from './link-default-variant-context'; import { defaultValue as singleTabStopDefaultValue, SingleTabStopNavigationContext, } from './single-tab-stop-navigation-context'; /* Use this context-resetter when creating a new modal-type context where typically the contents of the modal should not be affected by the surrounding components/DOM. */ const ResetContextsForModal = ({ children }) => (React.createElement(ButtonContext.Provider, { value: { onClick: () => { } } }, React.createElement(CollectionLabelContext.Provider, { value: { assignId: () => { } } }, React.createElement(FormFieldContext.Provider, { value: {} }, React.createElement(InfoLinkLabelContext.Provider, { value: "" }, React.createElement(LinkDefaultVariantContext.Provider, { value: linkDefaultValue }, React.createElement(SingleTabStopNavigationContext.Provider, { value: singleTabStopDefaultValue }, children))))))); export default ResetContextsForModal; //# sourceMappingURL=reset-contexts-for-modal.js.map