toggle-components-library 1.34.0-beta.8 → 1.34.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/toggle-components-library.common.js +84 -93
- package/dist/toggle-components-library.common.js.map +1 -1
- package/dist/toggle-components-library.css +1 -1
- package/dist/toggle-components-library.umd.js +84 -93
- package/dist/toggle-components-library.umd.js.map +1 -1
- package/dist/toggle-components-library.umd.min.js +1 -1
- package/dist/toggle-components-library.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/cards/ToggleCommentCard.vue +59 -62
- package/src/sass/includes/_as_cards.scss +3 -4
package/package.json
CHANGED
|
@@ -1,66 +1,63 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:buttonText="name"
|
|
11
|
-
icon="contacts-icon"
|
|
12
|
-
:styles="{ backgroundColor: 'transparent', borderColor: 'white', color: 'white'}"
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
2
|
+
<div class="toggle-comment-card">
|
|
3
|
+
<div class="toggle-comment-card-info" :style="{ backgroundColor: cardColor }">
|
|
4
|
+
<div class="toggle-comment-card-text">
|
|
5
|
+
<p>"{{ commentLength }}"</p>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="toggle-comment-card-name">
|
|
8
|
+
<slot name="button_contacts"></slot>
|
|
9
|
+
</div>
|
|
16
10
|
</div>
|
|
11
|
+
</div>
|
|
17
12
|
</template>
|
|
18
13
|
<script>
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
14
|
+
export default {
|
|
15
|
+
data() {
|
|
16
|
+
return {};
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
cardIndex: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
totalCards: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
comment: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
computed: {
|
|
37
|
+
cardColor() {
|
|
38
|
+
// adjust colour palette below to change the Reward Cards colors
|
|
39
|
+
const colorPalette = [
|
|
40
|
+
"#2c7da0",
|
|
41
|
+
"#f3c570",
|
|
42
|
+
"#8bbcbe",
|
|
43
|
+
"#a0a789",
|
|
44
|
+
"#cbae78",
|
|
45
|
+
"#a284b6",
|
|
46
|
+
"#d39999",
|
|
47
|
+
"#9b7361",
|
|
48
|
+
"#64aaa8",
|
|
49
|
+
"#799194",
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
// pick random number to return random index of colourPalette
|
|
53
|
+
const paletteIndex = Math.floor(
|
|
54
|
+
(this.cardIndex / this.totalCards) * colorPalette.length
|
|
55
|
+
);
|
|
56
|
+
return colorPalette[paletteIndex];
|
|
57
|
+
},
|
|
58
|
+
commentLength() {
|
|
59
|
+
return this.comment.length > 420 ? this.comment.substring(0, 420) + "..." : this.comment;
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
</script>
|
|
@@ -168,9 +168,8 @@
|
|
|
168
168
|
display: flex;
|
|
169
169
|
flex-direction: row;
|
|
170
170
|
width: 100%;
|
|
171
|
-
height:
|
|
171
|
+
height: 250px;
|
|
172
172
|
border-radius: 18px;
|
|
173
|
-
margin: 16px;
|
|
174
173
|
padding-right: 20px;
|
|
175
174
|
font-size: $toggle-font-size-regular;
|
|
176
175
|
font-family: $toggle-font-family;
|
|
@@ -180,13 +179,13 @@
|
|
|
180
179
|
display: flex;
|
|
181
180
|
flex-direction: column;
|
|
182
181
|
justify-content: space-between;
|
|
183
|
-
padding:
|
|
182
|
+
padding: 30px 70px 20px 30px;
|
|
184
183
|
color: white;
|
|
185
184
|
border-radius: 30px;
|
|
186
185
|
width: 100%;
|
|
187
186
|
|
|
188
187
|
.toggle-comment-card-text {
|
|
189
|
-
text-align:
|
|
188
|
+
text-align: justify;
|
|
190
189
|
line-height: 1.5rem;
|
|
191
190
|
|
|
192
191
|
p {
|