mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
price components fixes
This commit is contained in:
parent
af31b25ef2
commit
aaf3c2b8ae
@ -3,6 +3,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|||||||
import PriceUnit, { PriceUnitProps } from '@shared/Price/PriceUnit'
|
import PriceUnit, { PriceUnitProps } from '@shared/Price/PriceUnit'
|
||||||
import MarketMetadataProvider from '@context/MarketMetadata'
|
import MarketMetadataProvider from '@context/MarketMetadata'
|
||||||
import PricesProvider from '@context/Prices'
|
import PricesProvider from '@context/Prices'
|
||||||
|
import { UserPreferencesProvider } from '@context/UserPreferences'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Component/@shared/Price/PriceUnit',
|
title: 'Component/@shared/Price/PriceUnit',
|
||||||
@ -12,9 +13,9 @@ export default {
|
|||||||
const Template: ComponentStory<typeof PriceUnit> = (args: PriceUnitProps) => {
|
const Template: ComponentStory<typeof PriceUnit> = (args: PriceUnitProps) => {
|
||||||
return (
|
return (
|
||||||
<MarketMetadataProvider>
|
<MarketMetadataProvider>
|
||||||
<PricesProvider>
|
<UserPreferencesProvider>
|
||||||
<PriceUnit {...args} />
|
<PriceUnit {...args} />
|
||||||
</PricesProvider>
|
</UserPreferencesProvider>
|
||||||
</MarketMetadataProvider>
|
</MarketMetadataProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -2,16 +2,23 @@ import React from 'react'
|
|||||||
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
||||||
import Price, { PriceProps } from '@shared/Price'
|
import Price, { PriceProps } from '@shared/Price'
|
||||||
import { AccessDetails } from 'src/@types/Price'
|
import { AccessDetails } from 'src/@types/Price'
|
||||||
import { locale, currency, prices } from '../../../../.storybook/__mockdata__'
|
import { UserPreferencesProvider } from '@context/UserPreferences'
|
||||||
|
import MarketMetadataProvider from '@context/MarketMetadata'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Component/@shared/Price',
|
title: 'Component/@shared/Price',
|
||||||
component: Price
|
component: Price
|
||||||
} as ComponentMeta<typeof Price>
|
} as ComponentMeta<typeof Price>
|
||||||
|
|
||||||
const Template: ComponentStory<typeof Price> = (args: PriceProps) => (
|
const Template: ComponentStory<typeof Price> = (args: PriceProps) => {
|
||||||
<Price {...args} />
|
return (
|
||||||
)
|
<MarketMetadataProvider>
|
||||||
|
<UserPreferencesProvider>
|
||||||
|
<Price {...args} />
|
||||||
|
</UserPreferencesProvider>
|
||||||
|
</MarketMetadataProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
args: PriceProps
|
args: PriceProps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user