about summary refs log tree commit diff
path: root/components/Ranking/RankingList.stories.js
blob: ad3576b26824db1dacb2ad4a766d1922d0de26df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { storiesOf } from '@storybook/vue'
import { center } from '../../.storybook/decorators'

import RankingList from './RankingList'

import { rankingEntry } from './RankingEntry.stories'

const rankingList = {
  scores: Array.from(Array(3).keys()).map(i => ({
    ...rankingEntry,
    troop: `Troop${i}`
  }))
}

storiesOf('Ranking/RankingList', module)
  .addDecorator(center)
  .add('default', () => {
    return {
      components: { RankingList },
      template: `<ranking-list :scores="scores" />`,
      data: () => rankingList
    }
  })