12 lines
254 B
TypeScript
12 lines
254 B
TypeScript
export function changePathVisibility(path: string, hide: boolean) {
|
|
let n = document.querySelector(`[data-path="${path}"]`);
|
|
if (!n) {
|
|
return;
|
|
}
|
|
let p = n.parentElement
|
|
if (hide) {
|
|
p.style.display = `none`
|
|
} else {
|
|
p.style.display = ``;
|
|
}
|
|
}
|