Skip to content

Commit 7d9f507

Browse files
committed
Using TaggedValueList component
1 parent e3dbebd commit 7d9f507

File tree

3 files changed

+9
-29
lines changed

3 files changed

+9
-29
lines changed

components/Prize/PrizeItem.jsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

components/Prize/PrizeItem.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $gray: #47474F;
88
$purple: #B47DD6;
99
$accent: #59A7FF;
1010

11-
.PrizeItem {
11+
.TaggedValue {
1212
display:inline-block;
1313
height: 20px;
1414
margin-right: 15px;
@@ -38,37 +38,37 @@ $accent: #59A7FF;
3838
}
3939

4040
.prize {
41-
.PrizeItem:nth-child(1) {
41+
.TaggedValue:nth-child(1) {
4242
.tagged-value-bg {
4343
background: $gold;
4444
}
4545
}
46-
.PrizeItem:nth-child(2) {
46+
.TaggedValue:nth-child(2) {
4747
.tagged-value-bg {
4848
background: $silver;
4949
}
5050
}
5151

52-
.PrizeItem:nth-child(3) {
52+
.TaggedValue:nth-child(3) {
5353
.tagged-value-bg {
5454
background: $bronze;
5555
}
5656
}
5757
}
5858

5959
.bonus {
60-
.PrizeItem:nth-child(1) {
60+
.TaggedValue:nth-child(1) {
6161
.tagged-value-bg {
6262
background: $purple;
6363
}
6464
}
65-
.PrizeItem:nth-child(2) {
65+
.TaggedValue:nth-child(2) {
6666
.tagged-value-bg {
6767
background: $purple;
6868
}
6969
}
7070

71-
.PrizeItem:nth-child(3) {
71+
.TaggedValue:nth-child(3) {
7272
.tagged-value-bg {
7373
background: $accent;
7474
}

components/Prize/PrizeItems.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import classNames from 'classnames'
3-
import TaggedValue from '../TaggedValue/TaggedValue'
3+
import TaggedValueList from '../TaggedValue/TaggedValueList'
44

55
require('./PrizeItem.scss')
66

@@ -14,9 +14,7 @@ const PrizeItems = ({type, title, items}) => {
1414
<div className="PrizeItems">
1515
<div className="title">{title}</div>
1616
<div className={itemsClass}>
17-
{items.map((item, index) => {
18-
return <TaggedValue title={item.title} subText={item.subText} count={item.count} style="PrizeItem" key={index}/>
19-
})}
17+
<TaggedValueList items={items} layout="wrap"/>
2018
</div>
2119
</div>
2220
)

0 commit comments

Comments
 (0)