#3506881: Code component preview renders slots inside a tag
1 unresolved thread
Merged
requested to merge issue/experience_builder-3506881:3506881-code-component-preview-slots-rendering into 0.x
1 unresolved thread
Merge request reports
Activity
assigned to @balintbrews
85 .filter((slot) => slot.name) // Filter out slots with no name. 86 .map( 87 (slot) => `${camelCase(slot.name)}: h('Fragment', { 88 dangerouslySetInnerHTML: { 89 __html: '${slot?.example?.replace(/[\r\n]+/g, '')}' 90 } 91 })`, 92 ); 85 .filter((slot) => slot.name && slot.example) 86 .map((slot) => { 87 const slotName = camelCase(slot.name); 88 // Each slot example value is turned into a Preact component. The h() 89 // function is Preact's version of React's createElement() function, which 90 // will render the slot's example value. 91 // @see compile() 92 return `${slotName}: h(${slotName} || null)`; added 3 commits
-
57adcaef...cf1a9362 - 2 commits from branch
project:0.x
- 34ee8b6a - Merge branch '0.x' into 3506881-code-component-preview-slots-rendering
-
57adcaef...cf1a9362 - 2 commits from branch
Please register or sign in to reply