MCPcopy
hub / github.com/vercel/styled-jsx / flushToHTML

Function flushToHTML

test/index.js:16–27  ·  view source on GitHub ↗
(registry, options = {})

Source from the content-addressed store, hash-verified

14import _transform, { transformSource as _transformSource } from './_transform'
15
16const flushToHTML = (registry, options = {}) => {
17 const cssRules = registry.cssRules()
18 registry.flush()
19 return cssRules.reduce((html, args) => {
20 const id = args[0]
21 const css = args[1]
22 html += `<style id="__${id}"${
23 options.nonce ? ` nonce="${options.nonce}"` : ''
24 }>${css}</style>`
25 return html
26 }, '')
27}
28
29function mapCssRulesToReact(cssRules, options = {}) {
30 return cssRules.map(args => {

Callers 1

index.jsFile · 0.85

Calls 2

cssRulesMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…