MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / wrapAsElement

Function wrapAsElement

code/styling/public/app.js:20304–20319  ·  view source on GitHub ↗
(css, names)

Source from the content-addressed store, hash-verified

20302
20303/* takes a css factory function and outputs an element factory */
20304var wrapAsElement = function wrapAsElement(css, names) {
20305 return function () {
20306 var _props;
20307
20308 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props);
20309
20310 var nonce = getNonce();
20311 if (nonce) {
20312 // $FlowFixMe
20313 props.nonce = nonce;
20314 }
20315
20316 // eslint-disable-next-line react/no-danger
20317 return React__default.createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
20318 };
20319};
20320
20321var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
20322 return function () {

Callers 3

makeSpeedyTagFunction · 0.85
makeBrowserTagFunction · 0.85
makeServerTagInternalFunction · 0.85

Calls 2

stringifyNamesFunction · 0.85
cssFunction · 0.85

Tested by

no test coverage detected