@igloo-ui/provider
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Provider

Provider allows you to set the locale for all Igloo components that need it. This should be done by wrapping the entire application in the provider. There are also hooks available such as useLocale and useLocalizedStringFormatter.

Installation

To install @igloo-ui/provider in your project, you will need to run the following command using npm:

npm install @igloo-ui/provider

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/provider

Usage

Then to use the component in your code just import it!

import IglooProvider from '@igloo-ui/provider';

<IglooProvider locale="en-US">
    const { locale } = useLocale();

    <div>Here is the current locale: {locale}</div>;
</IglooProvider>

Readme

Keywords

none

Package Sidebar

Install

npm i @igloo-ui/provider

Weekly Downloads

240

Version

0.1.3

License

Apache-2.0

Unpacked Size

37.1 kB

Total Files

7

Last publish

Collaborators

  • infra.admin
  • franckgaudin