import React from 'react';
import Ticker from '../../atoms/Ticker';
import { storiesOf } from '@storybook/react';
import { select, number } from '@storybook/addon-knobs';
import PriceDisplay from './PriceDisplay';
import { currencyOptions } from '../../utils/currency-helpers';
import { getCurrencyPreSymbol, formatPriceDisplay, formatAmount } from '../../utils/cashtab-helpers';
storiesOf('Price Display', module)
.addDecorator(story =>
{story()}
)
.add(
'fiat',
() => {
const currency = select('Currency', currencyOptions, 'USD');
const price = number('Price', 0.001);
return (
);
},
{
notes: 'Displaying fiat currencies'
}
)
.add(
'xec',
() => {
const price = number('Price', 0.001);
const satoshis = price * 1e8;
return (
);
},
{
notes: `Displaying ${Ticker.coinSymbol}`
}
)
.add(
`${Ticker.tokenTicker}`,
() => {
const price = number('Price', 0.001);
const satoshis = price * 1e8;
return (
);
},
{
notes: `Displaying ${Ticker.tokenTicker} tokens`
}
);