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.
linkText?: string
// Link rel attribute for the `link` option.
//
// e.g. `external`
rel?: string
}
type FeatureIcon =

@ -10,11 +10,12 @@ defineProps<{
details?: string
link?: string
linkText?: string
rel?: string
}>()
</script>
<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">
<VPImage
v-if="typeof icon === 'object'"

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

Loading…
Cancel
Save