ember-cli-materialize icon indicating copy to clipboard operation
ember-cli-materialize copied to clipboard

md-collapsible doesn't admit div in collapsible body

Open miriamgonp opened this issue 6 years ago • 2 comments

Trying to use components inside the md-collapsible component, I've realized with the <p> tag you couldn't use <div> tag in the collapsible body because <p> doesn't admit <div> tag inside.

In order to allow this, we can change the <p> tag with a <div> tag. What do you think about this solution?

<div> {{yield}} </div>

Shall I create a PR with the code?

<div class="collapsible-body"> 
    <p>{{yield}}</p>
</div> 

miriamgonp avatar May 27 '19 14:05 miriamgonp

I assume you mean something like this (keeping the CSS class name):

<div class="collapsible-header {{if active 'active'}}" onClick={{action "headerClicked"}}>
  {{#if icon}}
    {{bw-compat-icon icon}}
  {{/if}}

  {{title}}
</div>

<div class="collapsible-body">{{yield}}</div>

MaterializeCSS suggests <span> but that has the same problem as <p> in that it's an inline element.

jacobq avatar May 28 '19 18:05 jacobq

Yes, That's exactly what I'm talking about.

miriamgonp avatar Jun 03 '19 06:06 miriamgonp