Fala mlkd, boa tarde.
Compartilho a minha solução.
HTML
<button data-appearance="show">Show</button>
<button data-appearance="hide">Hide</button>
JS
let paint = document.querySelectorAll('[tipo]');
let datum = document.querySelectorAll('[data-appearance]');
datum.forEach((element) => {
element.addEventListener('click', (event) => {
setDatum(element.getAttribute('data-appearance'));
});
});
function setDatum(param) {
if (param === 'hide') {
paint.forEach((element) => {
element.parentElement.setAttribute('style', 'display:none;');
});
} else {
paint.forEach((element) => {
element.parentElement.setAttribute('style', 'display:initial;');
});
}
}