mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
8ba35f673e
* Add tx list-item component New list item compoent for transaction history * Simplify component logic and remove type checks * Address remaining feedback * Remove extra line * Place className prop on its own line * Rename to primaryCurrency and secondaryCurrency * Make the title `isRequired` * Fix no-undef * Remove more + buttons to be implemented in seperate PR * Add minimal store and I18nProvider to storybook * Use Component to support translations * Add `metamask` to store * Rename decorator
45 lines
1008 B
JavaScript
45 lines
1008 B
JavaScript
import React from 'react'
|
|
import { addDecorator, addParameters } from '@storybook/react'
|
|
import { withKnobs } from '@storybook/addon-knobs/react'
|
|
import I18nProvider from '../ui/app/helpers/higher-order-components/i18n-provider'
|
|
import { Provider } from 'react-redux'
|
|
import configureStore from '../ui/app/store/store'
|
|
import '../ui/app/css/index.scss'
|
|
import en from '../app/_locales/en/messages'
|
|
|
|
addParameters({
|
|
backgrounds: [
|
|
{ name: 'light', value: '#FFFFFF'},
|
|
{ name: 'dark', value: '#333333' },
|
|
],
|
|
})
|
|
|
|
const styles = {
|
|
height: '100vh',
|
|
display: 'flex',
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
}
|
|
|
|
const store = configureStore({
|
|
metamask: { metamask: { currentLocale: 'en' } },
|
|
|
|
localeMessages: {
|
|
current: en,
|
|
en: en,
|
|
},
|
|
})
|
|
|
|
const metamaskDecorator = story => (
|
|
<Provider store={store}>
|
|
<I18nProvider>
|
|
<div style={styles}>
|
|
{ story() }
|
|
</div>
|
|
</I18nProvider>
|
|
</Provider>
|
|
)
|
|
|
|
addDecorator(withKnobs)
|
|
addDecorator(metamaskDecorator)
|