@explorer-1/vue 1.1.16 → 1.1.17
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -94,7 +94,7 @@ const props = defineProps({
|
|
|
94
94
|
>
|
|
95
95
|
<div class="col-span-9">
|
|
96
96
|
<div
|
|
97
|
-
v-if="theme"
|
|
97
|
+
v-if="props.theme"
|
|
98
98
|
class="text-subtitle-sm md:text-subtitle mb-3 md:mb-5 text-gray-mid-dark"
|
|
99
99
|
>
|
|
100
100
|
{{ props.theme }}
|
|
@@ -121,6 +121,7 @@ const props = defineProps({
|
|
|
121
121
|
</div>
|
|
122
122
|
<BaseLink
|
|
123
123
|
v-if="props.url"
|
|
124
|
+
custom-element-type="div"
|
|
124
125
|
class="mt-5"
|
|
125
126
|
variant="primary"
|
|
126
127
|
:href="props.url"
|
|
@@ -135,7 +136,7 @@ const props = defineProps({
|
|
|
135
136
|
>
|
|
136
137
|
<BaseImagePlaceholder aspect-ratio="square">
|
|
137
138
|
<BaseImage
|
|
138
|
-
v-if="props.image
|
|
139
|
+
v-if="props.image?.src"
|
|
139
140
|
:src="props.image.src.url"
|
|
140
141
|
:width="props.image.src.width"
|
|
141
142
|
:height="props.image.src.height"
|
|
@@ -154,6 +155,7 @@ const props = defineProps({
|
|
|
154
155
|
</div>
|
|
155
156
|
<BaseLink
|
|
156
157
|
v-if="props.url"
|
|
158
|
+
custom-element-type="div"
|
|
157
159
|
class="mt-5"
|
|
158
160
|
variant="primary"
|
|
159
161
|
:href="props.url"
|
|
@@ -30,6 +30,13 @@ export default defineComponent({
|
|
|
30
30
|
MixinAnimationCaret
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
|
+
/** Override html element (useful for things that should look like a link but aren't links) */
|
|
34
|
+
customElementType: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: undefined,
|
|
37
|
+
validator: (prop: string): boolean => ['span', 'button', 'div'].includes(prop)
|
|
38
|
+
},
|
|
39
|
+
/** Style of link: primary, secondary, default, none */
|
|
33
40
|
variant: {
|
|
34
41
|
type: String as PropType<VariantsKey>,
|
|
35
42
|
required: false,
|
|
@@ -263,7 +270,8 @@ export default defineComponent({
|
|
|
263
270
|
<template>
|
|
264
271
|
<div>
|
|
265
272
|
<!-- annoyingly repetive due to complexities around `to` and @click.native -->
|
|
266
|
-
<
|
|
273
|
+
<component
|
|
274
|
+
:is="customElementType || 'nuxt-link'"
|
|
267
275
|
v-if="computedTo"
|
|
268
276
|
class="group"
|
|
269
277
|
:class="computedClass"
|
|
@@ -302,8 +310,9 @@ export default defineComponent({
|
|
|
302
310
|
<template v-else>
|
|
303
311
|
<slot></slot>
|
|
304
312
|
</template>
|
|
305
|
-
</
|
|
306
|
-
<
|
|
313
|
+
</component>
|
|
314
|
+
<component
|
|
315
|
+
:is="customElementType || 'a'"
|
|
307
316
|
v-else-if="computedHref"
|
|
308
317
|
:href="computedHref"
|
|
309
318
|
class="group"
|
|
@@ -341,6 +350,6 @@ export default defineComponent({
|
|
|
341
350
|
<template v-else>
|
|
342
351
|
<slot></slot>
|
|
343
352
|
</template>
|
|
344
|
-
</
|
|
353
|
+
</component>
|
|
345
354
|
</div>
|
|
346
355
|
</template>
|