I’m trying to add an icon and text link into our header to using Theme Component
I’ve managed to add an icon using:
const { iconNode } = require("discourse-common/lib/icon-library");
api.decorateWidget('header-icons:before', helper => {
return helper.h('li.header-dropdown-toggle', [
helper.h('a.icon', {
href:'/docs',
title: 'Document'
}, iconNode("book")),
]);
});
But I’m struggling to add some text next to it that also links to the Documents url
I’ve tried adding the below - but the text isn’t linked
api.decorateWidget('header-icons:before', helper => {
return helper.h('li.header-dropdown-toggle', [
helper.h('h3', {
href:'/docs',
title: 'Document'
}, 'Docs'),
]);
What am i missing?
Also is there a way to have the icon the the left side of the header (next to our logo)?
Thanks in advance