feat: rel for feature links (#2704)

pull/2708/head
Mike Bostock 1 year ago committed by GitHub
parent 60dd0a474b
commit 5d18fd8978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -139,6 +139,11 @@ interface Feature {
// //
// e.g. `Learn more`, `Visit page`, etc. // e.g. `Learn more`, `Visit page`, etc.
linkText?: string linkText?: string
// Link rel attribute for the `link` option.
//
// e.g. `external`
rel?: string
} }
type FeatureIcon = type FeatureIcon =

@ -10,11 +10,12 @@ defineProps<{
details?: string details?: string
link?: string link?: string
linkText?: string linkText?: string
rel?: string
}>() }>()
</script> </script>
<template> <template>
<VPLink class="VPFeature" :href="link" :no-icon="true" :tag="link ? 'a' : 'div'"> <VPLink class="VPFeature" :href="link" :rel="rel" :no-icon="true" :tag="link ? 'a' : 'div'">
<article class="box"> <article class="box">
<VPImage <VPImage
v-if="typeof icon === 'object'" v-if="typeof icon === 'object'"

@ -9,6 +9,7 @@ export interface Feature {
details: string details: string
link?: string link?: string
linkText?: string linkText?: string
rel?: string
} }
const props = defineProps<{ const props = defineProps<{
@ -48,6 +49,7 @@ const grid = computed(() => {
:details="feature.details" :details="feature.details"
:link="feature.link" :link="feature.link"
:link-text="feature.linkText" :link-text="feature.linkText"
:rel="feature.rel"
/> />
</div> </div>
</div> </div>

Loading…
Cancel
Save