add provider to web and storybook

This commit is contained in:
Pavel Prichodko 2023-02-28 14:56:53 +01:00
parent 3625fa355a
commit 20eeaa8791
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
2 changed files with 7 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import '@tamagui/font-inter/css/700.css'
import React from 'react'
import { Provider } from '@status-im/components'
import { createRoot } from 'react-dom/client'
import App from './app'
@ -14,6 +15,8 @@ const root = document.getElementById('root') as HTMLElement
createRoot(root).render(
<React.StrictMode>
<Provider>
<App />
</Provider>
</React.StrictMode>
)

View File

@ -1,6 +1,5 @@
import React from 'react'
import { TamaguiProvider } from '@tamagui/core'
import { config } from '../src'
import { Provider } from '../src'
import { Parameters, Decorator } from '@storybook/react'
import './reset.css'
@ -17,9 +16,9 @@ export const parameters: Parameters = {
const withThemeProvider: Decorator = (Story, _context) => {
return (
<TamaguiProvider config={config}>
<Provider>
<Story />
</TamaguiProvider>
</Provider>
)
}
export const decorators = [withThemeProvider]