Skip to content

Commit cfb3d74

Browse files
committed
prerelease pr badge
1 parent fe8da33 commit cfb3d74

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script setup>
22
3-
const {version} = defineProps(["version"]);
3+
const {version, pr} = defineProps(["version", "pr"]);
44
55
</script>
66
<template>
7-
<Badge type="tip">
8-
<a :href="`https://github.com/observablehq/plot/releases/tag/v${version}`" :title="`added in v${version}`" target="_blank" rel="external" style="color: inherit;">
9-
^{{ version }}
7+
<Badge v-if="version || pr" :type="version ? `tip` : `warning`">
8+
<a :href="version ? `https://github.com/observablehq/plot/releases/tag/v${version}` : `https://github.com/observablehq/plot/pull/${pr}`" :title="version ? `added in v${version}` : `added in #${pr}`" target="_blank" rel="external" style="color: inherit;">
9+
{{ version ? `^${version}` : "prerelease" }}
1010
</a>
1111
</Badge>
1212
</template>

docs/marks/bollinger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const k = ref(2);
1010

1111
</script>
1212

13-
# Bollinger mark <Badge type="warning" text="prerelease" />
13+
# Bollinger mark <VersionBadge pr="1772" />
1414

1515
The **bollinger mark** is a [composite mark](../features/marks.md#marks) consisting of a [line](./line.md) representing a moving average and an [area](./area.md) representing volatility as a band; the band thickness is proportional to the deviation of nearby values. The bollinger mark is often used to analyze the price of financial instruments such as stocks.
1616

0 commit comments

Comments
 (0)