Refactor: CSS handling (#2344)
* refactor(css): only load base styles, add css task, cleanup exports * style(base): add edge label bg * refactor(css): use css-utils * feat(core): add Panel component * refactor(background): cleanup * refactor(css-handling): cleanup
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export function injectStyle(css: string) {
|
||||
if (typeof document === 'undefined') return;
|
||||
|
||||
const head = document.head || document.getElementsByTagName('head')[0];
|
||||
const style = document.createElement('style');
|
||||
|
||||
head.prepend(style);
|
||||
|
||||
style.appendChild(document.createTextNode(css));
|
||||
}
|
||||
Reference in New Issue
Block a user