@pocketprep/ui-kit 3.4.85 → 3.4.86

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.
@@ -11,6 +11,7 @@
11
11
  'uikit-tag--pending': isPendingTag,
12
12
  'uikit-tag--archived': isArchivedTag,
13
13
  }"
14
+ :style="tagStyles"
14
15
  >
15
16
  <slot name="tagMessage" />
16
17
  </div>
@@ -20,6 +21,12 @@
20
21
  import { Vue, Component, Prop } from 'vue-facing-decorator'
21
22
  import { dark } from '../../directives'
22
23
 
24
+ type TTagStyles = {
25
+ background?: string
26
+ color?: string
27
+ border?: string
28
+ }
29
+
23
30
  @Component({
24
31
  directives: {
25
32
  dark,
@@ -33,6 +40,26 @@ export default class Tag extends Vue {
33
40
  @Prop({ default: false }) isArchivedTag!: boolean
34
41
  @Prop({ default: 'large' }) size!: 'small' | 'medium' | 'large'
35
42
  @Prop({ default: false }) isDarkMode!: boolean
43
+ @Prop({ default: undefined }) backgroundColor!: string | undefined
44
+ @Prop({ default: undefined }) textColor!: string | undefined
45
+ @Prop({ default: undefined }) tagBorder!: string | undefined
46
+
47
+ get tagStyles () {
48
+ const tagStylesObj: TTagStyles = {}
49
+ if (this.backgroundColor) {
50
+ tagStylesObj['background'] = this.backgroundColor
51
+ }
52
+
53
+ if (this.textColor) {
54
+ tagStylesObj['color'] = this.textColor
55
+ }
56
+
57
+ if (this.tagBorder) {
58
+ tagStylesObj['border'] = this.tagBorder
59
+ }
60
+
61
+ return Object.keys(tagStylesObj).length !== 0 ? tagStylesObj : undefined
62
+ }
36
63
  }
37
64
  </script>
38
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/ui-kit",
3
- "version": "3.4.85",
3
+ "version": "3.4.86",
4
4
  "description": "Pocket Prep UI Kit",
5
5
  "author": "pocketprep",
6
6
  "scripts": {