classcard-ui 0.2.982 → 0.2.983

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.982",
3
+ "version": "0.2.983",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -7,7 +7,7 @@
7
7
  :class="[
8
8
  classes,
9
9
  imageClasses,
10
- hasRing ? `p-0.5 ring-2 ring-${ringColor}-200` : '',
10
+ hasRing ? `p-0.5 ring-2 ${getRingColor}` : '',
11
11
  ]"
12
12
  class="inline-block object-cover"
13
13
  :src="image"
@@ -16,23 +16,31 @@
16
16
  </div>
17
17
  <div
18
18
  v-else
19
- :class="[
20
- 'flex-none text-center font-medium ',
21
- nameInitialsClasses,
22
- `border-${isDynamicallyColored ? customColor : 'red'}-300`,
23
- `bg-${isDynamicallyColored ? customColor : 'red'}-100`,
24
- `text-${isDynamicallyColored ? customColor : 'red'}-600`,
25
- hasRing ? `p-0.5 ring-2 ring-${ringColor}-200` : '',
26
- ]"
27
- :style="[
28
- size == 'medium' ? { 'line-height': '3rem' } : '',
29
- size == 'large' ? { 'line-height': '3.5rem' } : '',
30
- size == 'very large' ? { 'line-height': '6rem' } : '',
31
- size == 'extraextrasmall' ? { 'font-size': '0.5rem' } : '',
32
- size == 'extrasmall' ? { 'font-size': '0.7rem' } : '',
33
- ]"
19
+ :class="
20
+ hasRing
21
+ ? `${getRingColor} flex h-[53px] w-[53px] items-center justify-center
22
+ justify-items-center rounded-full p-0.5 ring-2`
23
+ : ''
24
+ "
34
25
  >
35
- {{ nameInitials }}
26
+ <div
27
+ :class="[
28
+ 'flex-none text-center font-medium ',
29
+ nameInitialsClasses,
30
+ `border-${isDynamicallyColored ? customColor : 'red'}-300`,
31
+ `bg-${isDynamicallyColored ? customColor : 'red'}-100`,
32
+ `text-${isDynamicallyColored ? customColor : 'red'}-600`,
33
+ ]"
34
+ :style="[
35
+ size == 'medium' ? { 'line-height': '3rem' } : '',
36
+ size == 'large' ? { 'line-height': '3.5rem' } : '',
37
+ size == 'very large' ? { 'line-height': '6rem' } : '',
38
+ size == 'extraextrasmall' ? { 'font-size': '0.5rem' } : '',
39
+ size == 'extrasmall' ? { 'font-size': '0.7rem' } : '',
40
+ ]"
41
+ >
42
+ {{ nameInitials }}
43
+ </div>
36
44
  </div>
37
45
  <div class="ml-3 text-left" v-if="name">
38
46
  <p v-if="name" class="text-sm text-gray-900">
@@ -104,6 +112,15 @@ export default {
104
112
  "rounded-md": this.rounded == false,
105
113
  };
106
114
  },
115
+ getRingColor() {
116
+ if (this.ringColor == "yellow") {
117
+ return "ring-[#fef08a]";
118
+ } else if (this.ringColor == "indigo") {
119
+ return "ring-indigo-200";
120
+ } else {
121
+ return "ring-gray-200";
122
+ }
123
+ },
107
124
  },
108
125
  methods: {
109
126
  setColors() {