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

17 lines 671 B
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React, { useContext } from 'react'; export const InternalI18nContext = React.createContext({ locale: null, format: (_namespace, _component, _key, provided) => provided, }); export function useLocale() { return useContext(InternalI18nContext).locale; } export function useInternalI18n(componentName) { const { format } = useContext(InternalI18nContext); return (key, provided, customHandler) => { return format('@awsui/components-react', componentName, key, provided, customHandler); }; } //# sourceMappingURL=context.js.map