icons.js 332 B

1234567891011121314
  1. const material_icon = (name) => {
  2. if (typeof(name) !== "string") {
  3. throw new TypeError("Name of the icon must be string.");
  4. }
  5. const target = document.createElement("span");
  6. target.classList.add("material-symbols-outlined");
  7. target.innerText = name;
  8. return target;
  9. };
  10. export { material_icon };