JSFiddle - React, Tailwind, and code Playground

HTML

<h1 id="h1_id">Directory: SD/</h1>

<button id="root-btn">
  SD-Rooot
</button>

CSS

#root-btn[disabled] {
  color: darkgrey;
  background-color: grey;
}

#root-btn {
  color: white; 
  background-color: blue;
}

#root-btn:not([disabled]):hover {
  color: black; 
  background-color: orange;
}

JavaScript

function btn_ausgrauen() {
  const h1txt = document.getElementById('h1_id').textContent;
  const a = document.getElementById('root-btn');
  a.disabled = (h1txt === "Directory: SD" || h1txt === "Directory: SD/");
}

btn_ausgrauen();