typeit
Version:
The most versatile animated typing utility on the planet.
10 lines (8 loc) • 325 B
text/typescript
import createElement from "./createElement";
import createTextNode from "./createTextNode";
export default (styles: string, id: string = ""): void => {
let styleBlock: HTMLElement = createElement("style");
styleBlock.id = id;
styleBlock.appendChild(createTextNode(styles));
document.head.appendChild(styleBlock);
};