@dataloop-ai/components 0.16.12 → 0.16.13

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": "@dataloop-ai/components",
3
- "version": "0.16.12",
3
+ "version": "0.16.13",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -50,18 +50,28 @@ export default defineComponent({
50
50
  fontWeight: this.bold ? 'bold' : 400
51
51
  }
52
52
 
53
- if (!this.size) {
54
- if (sizes.includes(this.variant)) {
55
- styles.fontSize = this.variant as string
56
- }
57
- } else {
53
+ if (this.size && !sizes.includes(this.size)) {
58
54
  styles.fontSize = this.size as string
59
55
  }
60
56
 
61
57
  return styles
62
58
  },
63
59
  classes(): string[] {
64
- return [`dl-typography dl-typography--${this.size}`]
60
+ const classes = [`dl-typography`]
61
+
62
+ if (this.size) {
63
+ if (sizes.includes(this.size)) {
64
+ classes.push(`dl-typography--${this.size}`)
65
+ }
66
+ } else {
67
+ if (sizes.includes(this.variant)) {
68
+ classes.push(`dl-typography--${this.size}`)
69
+ } else {
70
+ classes.push(`dl-typography--body`)
71
+ }
72
+ }
73
+
74
+ return classes
65
75
  }
66
76
  }
67
77
  })