diff --git a/packages/volto-slate-glossary/src/components/TooltipPopup.jsx b/packages/volto-slate-glossary/src/components/TooltipPopup.jsx new file mode 100644 index 0000000..29f503b --- /dev/null +++ b/packages/volto-slate-glossary/src/components/TooltipPopup.jsx @@ -0,0 +1,25 @@ +import { Popup } from 'semantic-ui-react'; +import config from '@plone/volto/registry'; + +const TooltipPopup = ({ term, definition, idx = 0 }) => { + const mentionTermInTooltip = config.settings.glossary.mentionTermInTooltip; + return ( + {term}} + className="tooltip" + key={idx} + > + {mentionTermInTooltip ? {term} : null} + +
+ + + ); +}; + +export default TooltipPopup;