import React, { ComponentProps } from 'react'
import { storiesOf } from '@storybook/react'

import { TimeSeriesText } from './component'
import { Frame } from './test.style'
// import { useFontFamily } from 'storybook/src/components/font-provider'

type TimeSeriesTextProps = ComponentProps<typeof TimeSeriesText>

const TEST_VALUES: TimeSeriesTextProps['values'] = [
  { t: 1000000, v: '123.4' },
  { t: 1000001, v: -123.5 },
  { t: 1000002, v: 9999 },
  { t: 1000003, v: 10000 },
  { t: 1000004, v: 10.34 },
  { t: 1000005, v: '-1299.3' },
  { t: 1000006, v: 45 },
  { t: 1000007, v: -999887 },
]

storiesOf(__dirname, module)
  /**
   * 通常表示
   */
  .add('component', () => {
    return (
      <Frame>
        <TimeSeriesText values={TEST_VALUES} />
      </Frame>
    )
  })
