Skip to content

Commit

Permalink
Show a header in the tooltip.
Browse files Browse the repository at this point in the history
This repeats the term, which can look nice.
  • Loading branch information
mauritsvanrees committed Oct 24, 2024
1 parent bdb255c commit ce1b2a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/volto-slate-glossary/news/12.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Show a header in the tooltip.
This repeats the term, which can look nice.
@mauritsvanrees
6 changes: 6 additions & 0 deletions packages/volto-slate-glossary/src/components/Tooltips.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ export const enhanceTextWithTooltips = (text, remainingGlossaryterms) => {
className="tooltip"
>
<Popup.Content>
<div
className="tooltip_header"
dangerouslySetInnerHTML={{
__html: el.val,
}}
/>
<div
className="tooltip_content"
dangerouslySetInnerHTML={{
Expand Down

0 comments on commit ce1b2a8

Please sign in to comment.