( target: Array<Chunk | PrecomputedChunk>, props: Object, )
| 3209 | ) => `${prefix}${s === 's' ? '\\73 ' : '\\53 '}${suffix}`; |
| 3210 | |
| 3211 | function pushStyleImpl( |
| 3212 | target: Array<Chunk | PrecomputedChunk>, |
| 3213 | props: Object, |
| 3214 | ): ReactNodeList { |
| 3215 | target.push(startChunkForTag('style')); |
| 3216 | |
| 3217 | let children = null; |
| 3218 | let innerHTML = null; |
| 3219 | for (const propKey in props) { |
| 3220 | if (hasOwnProperty.call(props, propKey)) { |
| 3221 | const propValue = props[propKey]; |
| 3222 | if (propValue == null) { |
| 3223 | continue; |
| 3224 | } |
| 3225 | switch (propKey) { |
| 3226 | case 'children': |
| 3227 | children = propValue; |
| 3228 | break; |
| 3229 | case 'dangerouslySetInnerHTML': |
| 3230 | innerHTML = propValue; |
| 3231 | break; |
| 3232 | default: |
| 3233 | pushAttribute(target, propKey, propValue); |
| 3234 | break; |
| 3235 | } |
| 3236 | } |
| 3237 | } |
| 3238 | |
| 3239 | // Style never participate as a ViewTransition. |
| 3240 | target.push(endOfStartTag); |
| 3241 | |
| 3242 | const child = Array.isArray(children) |
| 3243 | ? children.length < 2 |
| 3244 | ? children[0] |
| 3245 | : null |
| 3246 | : children; |
| 3247 | if ( |
| 3248 | typeof child !== 'function' && |
| 3249 | typeof child !== 'symbol' && |
| 3250 | child !== null && |
| 3251 | child !== undefined |
| 3252 | ) { |
| 3253 | target.push(stringToChunk(escapeStyleTextContent(child))); |
| 3254 | } |
| 3255 | pushInnerHTML(target, innerHTML, children); |
| 3256 | target.push(endChunkForTag('style')); |
| 3257 | return null; |
| 3258 | } |
| 3259 | |
| 3260 | function pushStyleContents( |
| 3261 | target: Array<Chunk | PrecomputedChunk>, |
no test coverage detected