-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
Copy pathQuizzesStats.stories.tsx
57 lines (50 loc) · 1.38 KB
/
QuizzesStats.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import type { Meta, StoryObj } from "@storybook/react"
import QuizzesStats from "../QuizzesStats"
const meta = {
title: "Molecules / Display Content / Quiz / QuizzesStats",
component: QuizzesStats,
args: {
averageScoresArray: [],
completedQuizzes: {
"layer-2": [false, 0],
"run-a-node": [false, 0],
merge: [false, 0],
"staking-solo": [false, 0],
"what-is-ether": [false, 0],
"what-is-ethereum": [false, 0],
nfts: [false, 0],
scaling: [false, 0],
security: [false, 0],
wallets: [false, 0],
web3: [false, 0],
daos: [false, 0],
stablecoins: [false, 0],
defi: [false, 0],
gas: [false, 0],
},
totalCorrectAnswers: 0,
},
} satisfies Meta<typeof QuizzesStats>
export default meta
type Story = StoryObj<typeof meta>
export const StartingStats: Story = {}
export const OneCompletedQuiz = {
args: {
averageScoresArray: [100],
completedQuizzes: {
...meta.args.completedQuizzes,
"layer-2": [true, 4],
},
totalCorrectAnswers: 4,
},
} satisfies Story
export const HasIncompleteQuiz: Story = {
args: {
averageScoresArray: [...OneCompletedQuiz.args.averageScoresArray, 50],
completedQuizzes: {
...OneCompletedQuiz.args.completedQuizzes,
"what-is-ether": [false, 2],
},
totalCorrectAnswers: OneCompletedQuiz.args.totalCorrectAnswers + 2,
},
}