googlearchive / paper-dialog

A dialog à la Material Design
19 stars 13 forks source link

Sub-heading or heading in light dom feature #46

Open benjaminapetersen opened 9 years ago

benjaminapetersen commented 9 years ago

A subheading attribute would be interesting, but I think it may actually be even better to use a content-selector around a div or some dom element with a class to put whatever HTML provided as the heading. Something to the effect of:

<paper-dialog>
<div class="heading">
    <h2>This is the <strong>title<strong></h2>
    <h3>This is a subtitle</h3>
    <p>Little tiny text snippet saying something clever.</p>
</div>
<div class="content">
<p>This is where all the rest of the stuff goes. </p>
</div>
</paper-dialog>

This seems similar to what has recently been done with paper-button, and how core-header-panel works with the "core-header" class, keeping content in the light dom.

Throwing it out there to chew on.

ssorallen commented 9 years ago

It seems more reasonable to let the user style and maintain the light DOM as he or she sees fit rather than adding more features to what should be a generic element. I would actually go the other direction and say that the <template if="{{heading}}"> might be better off being removed from paper-dialog to stress that this is just a generic container that sits on top of other content. The contents are up to the user.