MCPcopy
hub / github.com/microsoft/rushstack / loadStyles

Function loadStyles

src/index.ts:71–79  ·  view source on GitHub ↗
(styles: string | ThemableArray)

Source from the content-addressed store, hash-verified

69 * @param {string | ThemableArray} styles Themable style text to register.
70 */
71export function loadStyles(styles: string | ThemableArray): void {
72 const styleParts: ThemableArray = Array.isArray(styles) ? styles : splitStyles(styles);
73
74 if (_injectStylesWithCssText === undefined) {
75 _injectStylesWithCssText = shouldUseCssText();
76 }
77
78 applyThemableStyles(styleParts);
79}
80
81/**
82 * Allows for customizable loadStyles logic. e.g. for server side rendering application

Callers 1

index.test.tsFile · 0.90

Calls 4

splitStylesFunction · 0.85
shouldUseCssTextFunction · 0.85
applyThemableStylesFunction · 0.85
isArrayMethod · 0.80

Tested by

no test coverage detected