using a paper card inside a menu button

29 views
Skip to first unread message

paladi...@gmail.com

unread,
Feb 15, 2017, 7:53:49 PM2/15/17
to Polymer
Hello all!
I want to have a paper-icon-button open a card on top of the button that displays some text.
This is how I'm doing it:

            <paper-menu-button>
                <paper-icon-button icon="info" class="dropdown-trigger"></paper-icon-button>
                <paper-card class="dropdown-content">
                    <div class="card-content">
                        <span style="color: black"> Details! </span>
                    </div>
                </paper-card>
            </paper-menu-button>

First, is using paper-menu-button the right approach? I'm new to polymer and am using that specific element because of how it toggles whether the dropdown content is being shown but for all I know there's something more appropriate.
Second, how do I make the paper-card big enough to fit it's contents? There aren't any problem with just the one word in it but if I add any more the box becomes scrollable instead of resizing, and I would prefer it just stretch to fit.


Also, while I'm here, in another area I'm using a paper-fab with the label set to a string, like so:
<paper-fab mini label="CR"></paper-fab> 
but want to be able to change the color of the label. How do I do that?

Many thanks!
Reply all
Reply to author
Forward
0 new messages