Skip to content

Commit a22929d

Browse files
author
vikasrohit
committed
Merge pull request #79 from amolskh/prizeComponent
final fixes
2 parents e697722 + 7d9f507 commit a22929d

File tree

5 files changed

+23
-39
lines changed

5 files changed

+23
-39
lines changed

components/Prize/PrizeExamples.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import PrizeItems from './PrizeItems'
33

44
require('./PrizeExamples.scss')
55

6+
7+
68
const prizeItems = {
79
type : 'prize',
810
title : 'Prizes',
@@ -48,7 +50,8 @@ const bonusItems = {
4850
},
4951
{
5052
title : 'Checkin',
51-
subText : '$50 x 5'
53+
subText : '$50',
54+
count: '6'
5255
}
5356
]
5457
}

components/Prize/PrizeExamples.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
background-color: #47474F;
33
padding: 15px;
44
width: 400px;
5+
height: 200px !important;
56
}

components/Prize/PrizeItem.jsx

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

components/Prize/PrizeItem.scss

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

11-
.PrizeItem {
11+
.TaggedValue {
1212
display:inline-block;
1313
height: 20px;
1414
margin-right: 15px;
1515

16-
span {
16+
.subText {
1717
font-family: "Roboto", Arial, Helvetica, sans-serif;
1818
font-size: 13px;
1919
line-height: 15px;
2020
color: $white;
2121
font-weight: 500;
2222
}
23-
.prize-circle{
23+
.tagged-value-bg{
2424
display: inline;
2525
padding: 1px 4px 1px 4px;
2626
min-width: 15px;
@@ -38,38 +38,38 @@ $accent: #59A7FF;
3838
}
3939

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

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

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

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

components/Prize/PrizeItems.jsx

Lines changed: 3 additions & 5 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 PrizeItem from './PrizeItem'
3+
import TaggedValueList from '../TaggedValue/TaggedValueList'
44

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

@@ -14,15 +14,13 @@ 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 <PrizeItem title={item.title} subText={item.subText} key={index}/>
19-
})}
17+
<TaggedValueList items={items} layout="wrap"/>
2018
</div>
2119
</div>
2220
)
2321
}
2422

25-
PrizeItem.propTypes = {
23+
PrizeItems.propTypes = {
2624
type : React.PropTypes.string,
2725
items : React.PropTypes.array
2826
}

0 commit comments

Comments
 (0)