1 | import { InjectionMode, Stylesheet } from './Stylesheet';
|
2 | /**
|
3 | * Renders a given string and returns both html and css needed for the html.
|
4 | * @param onRender - Function that returns a string.
|
5 | * @param namespace - Optional namespace to prepend to css classnames to avoid collisions.
|
6 | */
|
7 | export function renderStatic(onRender, namespace) {
|
8 | var stylesheet = Stylesheet.getInstance();
|
9 | stylesheet.setConfig({
|
10 | injectionMode: InjectionMode.none,
|
11 | namespace: namespace,
|
12 | });
|
13 | stylesheet.reset();
|
14 | return {
|
15 | html: onRender(),
|
16 | css: stylesheet.getRules(true),
|
17 | };
|
18 | }
|
19 | //# sourceMappingURL=server.js.map |
\ | No newline at end of file |