add provider to web and storybook
This commit is contained in:
parent
3625fa355a
commit
20eeaa8791
|
@ -6,6 +6,7 @@ import '@tamagui/font-inter/css/700.css'
|
||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
import { Provider } from '@status-im/components'
|
||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
|
|
||||||
import App from './app'
|
import App from './app'
|
||||||
|
@ -14,6 +15,8 @@ const root = document.getElementById('root') as HTMLElement
|
||||||
|
|
||||||
createRoot(root).render(
|
createRoot(root).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
|
<Provider>
|
||||||
<App />
|
<App />
|
||||||
|
</Provider>
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { TamaguiProvider } from '@tamagui/core'
|
import { Provider } from '../src'
|
||||||
import { config } from '../src'
|
|
||||||
import { Parameters, Decorator } from '@storybook/react'
|
import { Parameters, Decorator } from '@storybook/react'
|
||||||
|
|
||||||
import './reset.css'
|
import './reset.css'
|
||||||
|
@ -17,9 +16,9 @@ export const parameters: Parameters = {
|
||||||
|
|
||||||
const withThemeProvider: Decorator = (Story, _context) => {
|
const withThemeProvider: Decorator = (Story, _context) => {
|
||||||
return (
|
return (
|
||||||
<TamaguiProvider config={config}>
|
<Provider>
|
||||||
<Story />
|
<Story />
|
||||||
</TamaguiProvider>
|
</Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export const decorators = [withThemeProvider]
|
export const decorators = [withThemeProvider]
|
||||||
|
|
Loading…
Reference in New Issue