@imaginario27/air-ui-ds 1.1.1 → 1.1.2
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.
|
@@ -27,11 +27,7 @@ const props = defineProps({
|
|
|
27
27
|
default: IconSize.MD,
|
|
28
28
|
validator: (value: IconSize) => Object.values(IconSize).includes(value),
|
|
29
29
|
},
|
|
30
|
-
color:
|
|
31
|
-
type: String as PropType<ColorAccent>,
|
|
32
|
-
default: ColorAccent.NEUTRAL,
|
|
33
|
-
validator: (value: ColorAccent) => Object.values(ColorAccent).includes(value),
|
|
34
|
-
},
|
|
30
|
+
color: String as PropType<ColorAccent>,
|
|
35
31
|
svgCustomize: Function as PropType<CollectionCustomizeCallback>,
|
|
36
32
|
iconClass: [String, Array] as PropType<string | string[]>,
|
|
37
33
|
})
|
|
@@ -58,6 +54,8 @@ const iconSizeClass = computed(() => {
|
|
|
58
54
|
})
|
|
59
55
|
|
|
60
56
|
const iconColorClass = computed(() => {
|
|
57
|
+
if (!props.color) return 'text-inherit'
|
|
58
|
+
|
|
61
59
|
const variants = {
|
|
62
60
|
[ColorAccent.NEUTRAL]: 'text-icon-default',
|
|
63
61
|
[ColorAccent.SUCCESS]: 'text-icon-success',
|
|
@@ -68,6 +66,6 @@ const iconColorClass = computed(() => {
|
|
|
68
66
|
[ColorAccent.SECONDARY_BRAND]: 'text-icon-secondary-brand-default',
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
return variants[props.color
|
|
69
|
+
return variants[props.color] || 'text-inherit'
|
|
72
70
|
})
|
|
73
71
|
</script>
|