1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/.storybook
Mark Stacey 2b6aff535e
Migrate "i18n-provider" to new context API (#8213)
The "i18n-provider" module has been replaced by a new `i18n.js` module
in the `contexts` directory which provides the `t` function via the new
React Context API.

The legacy context API is still used throughout the codebase, so a
legacy context provider has also been added as a shim until we migrate
away from the old API. The migration does require changing every single
place where the `t` function is used, so it is a non-trivial amount of
work. This shim allows us to tackle it one piece at a time without
breaking anything.

This was placed in a new `contexts` directory because it didn't seem
to belong in any existing categories. It certainly isn't a higher-order
component.
2020-03-23 14:07:05 -03:00
..
main.js Allow changing Storybook preview backgrounds (#8111) 2020-02-26 13:40:53 -04:00
preview.js Migrate "i18n-provider" to new context API (#8213) 2020-03-23 14:07:05 -03:00
README.md Switch from npm to yarn (#6843) 2019-07-30 15:36:23 -03:00
webpack.config.js Notifications Icon Circles (#7830) 2020-03-11 12:30:39 -02:30

Storybook

We're currently using Storybook as part of our design system. To run Storybook and test some of our UI components, clone the repo and run the following:

yarn
yarn storybook

You should then see:

info Storybook started on => http://localhost:6006/

In your browser, navigate to http://localhost:6006/ to see the Storybook application. From here, you'll be able to easily view components and even modify some of their properties.