@energysage/es-ds-components 3.0.8 → 3.0.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.
@@ -35,8 +35,14 @@ const actualVariant = computed(() => {
35
35
  });
36
36
  const defaultTag = computed(() => {
37
37
  // if an href is provided and no alternate link tag was provided (e.g. nuxt-link),
38
- // force the tag to be a nuxt-link, no matter the variant
38
+ // force the tag to be an anchor tag, no matter the variant
39
39
  if (props.href && props.tag === 'div') {
40
+ return 'a';
41
+ }
42
+
43
+ // if a 'to' destination is provided and no alternate link tag was provided (e.g. nuxt-link),
44
+ // force the tag to be a nuxt-link, no matter the variant
45
+ if (props.to && props.tag === 'div') {
40
46
  return 'nuxt-link';
41
47
  }
42
48
 
@@ -57,7 +63,8 @@ const defaultTag = computed(() => {
57
63
  :is="defaultTag == 'nuxt-link' ? NuxtLink : defaultTag"
58
64
  class="es-card"
59
65
  :class="actualVariant"
60
- :to="to ? to : href"
66
+ :href="href"
67
+ :to="to"
61
68
  v-bind="$attrs">
62
69
  <slot />
63
70
  </component>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energysage/es-ds-components",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "An EnergySage Vue component library",