The purpose if this issue is to document a solution we came across while @rborosak tried to implement a panel component as combination of custom elements.
Bootstrap's css for panels looks like this:
.panel-default > .panel-heading {
style
}
The problem in question was the template of the b-panel custom element:
the css in bootstrap isn't picking up on this because it is defined as .panel-default > .panel-heading { which means the .panel-heading is supposed to be directly underneath a .panel-default, and our b-panel-heading decorator is inbetween causing the css not to be applied
Furthermore, the <b-panel-heading> element should be configurable by its parent.
The solution has two steps:
assign the class panel directly to b-panel's template and use <content select="...">:
<template class="panel">
<content select="b-panel-heading"></content><!--or just content -->
</template>
The purpose if this issue is to document a solution we came across while @rborosak tried to implement a panel component as combination of custom elements.
Bootstrap's css for panels looks like this:
The problem in question was the template of the
b-panel
custom element:@JeroenVinke proposed something like:
pointing out that:
Furthermore, the
<b-panel-heading>
element should be configurable by its parent.The solution has two steps:
panel
directly to b-panel's template and use<content select="...">
:<b-panel>
so they have classes configured in b-panel's bindings.That way it is possible to keep this structure, satisfying Bootstrap's css:
and have the class
panel-heading
be configurable by its parent.