(registry, options = {})
| 14 | import _transform, { transformSource as _transformSource } from './_transform' |
| 15 | |
| 16 | const 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 | |
| 29 | function mapCssRulesToReact(cssRules, options = {}) { |
| 30 | return cssRules.map(args => { |