forked from github/quartz
feat(explorer): Add active class to current folder in explorer (#2196)
This commit is contained in:
1 parent
c2dcc63b5f
commit
f346a01296
1 file changed
+4
@@ -111,6 +111,10 @@ function createFolderNode(
|
||||
const folderPath = node.slug
|
||||
folderContainer.dataset.folderpath = folderPath
|
||||
|
||||
if (currentSlug === folderPath) {
|
||||
folderContainer.classList.add("active")
|
||||
}
|
||||
|
||||
if (opts.folderClickBehavior === "link") {
|
||||
// Replace button with link for link behavior
|
||||
const button = titleContainer.querySelector(".folder-button") as HTMLElement
|
||||
|
||||
Reference in new issue
Block a user