From b6ca4c8c8412d992f8a8ac5f2dae998959c9e701 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Mon, 1 Feb 2021 21:02:36 +0000 Subject: [PATCH] Add "TagLabel--child" class to tagLabel to aid with custom theming (#114) --- extensions/tags/js/src/common/helpers/tagLabel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/tags/js/src/common/helpers/tagLabel.js b/extensions/tags/js/src/common/helpers/tagLabel.js index d3a82b39c..462d25bbe 100644 --- a/extensions/tags/js/src/common/helpers/tagLabel.js +++ b/extensions/tags/js/src/common/helpers/tagLabel.js @@ -20,6 +20,10 @@ export default function tagLabel(tag, attrs = {}) { attrs.title = tag.description() || ''; attrs.href = app.route('tag', {tags: tag.slug()}); } + + if (tag.isChild()) { + attrs.className += ' TagLabel--child'; + } } else { attrs.className += ' untagged'; }