Skip to content

Commit 5e96e61

Browse files
authored
DOC-817 Add description of beta on hover of the beta label (#263)
* Add description of beta on hover of the beta label * Remove duplicate selector
1 parent 8708cbe commit 5e96e61

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

src/css/context-switcher.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
margin: 0;
1313
}
1414

15+
.beta-label > p:hover {
16+
cursor: pointer;
17+
}
18+
1519
.context-switcher button {
1620
background: none;
1721
color: inherit;
@@ -37,7 +41,3 @@
3741
color: var(--link-highlight-color);
3842
padding: 3px;
3943
}
40-
41-
.beta-label > p:hover {
42-
cursor: default;
43-
}

src/partials/article.hbs

+13-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,20 @@
2828
{{/if}}
2929
{{#if page.attributes.beta}}
3030
<div class="beta-label">
31-
<p title="This feature is in beta.">Beta</p>
31+
<p>Beta</p>
3232
</div>
33+
<script>
34+
const betaButton = document.querySelector('.beta-label p');
35+
// Create a Tippy instance on the button
36+
const tippyInstance = tippy(betaButton, {
37+
content: 'This feature is in beta. Features in beta are available for testing and feedback. They are not supported by Redpanda and should not be used in production environments.',
38+
animation: 'scale',
39+
theme: 'redpanda-term',
40+
touch: 'hold',
41+
interactive: true,
42+
allowHTML: true,
43+
});
44+
</script>
3345
{{/if}}
3446
{{#if (eq page.attributes.role 'home')}}
3547
{{> home}}

0 commit comments

Comments
 (0)