user3757992
user3757992

Reputation: 159

Google Dart Paper Button Selector

I cannot seem to create a paper button that allows me to use it as a selector for closing a paper-dialog. I have a feeling this is a CSS issue, but I could be wrong. The button gets created after all of the elements and when you switch tabs, it essentially re-creates the button into a new div. Below is my code for the CSS, Dialog setup, and the Dart code. Please let me know if you need more information from me.

Dart and markup:

PaperButton button;


button = new PaperButton();
button.label = "Close";
settingsDialog.children.add(button);

settingsDialog.autoCloseDisabled = true;
settingsDialog.closeSelector = "paper-button";


<paper-dialog id="properties" style='background-color:#fbfbfb; margin: 0 auto; border-style: double; border-color: #FEB33F; position:fixed;'>

 <paper-tabs id="Tabs" noink="true" selected="{{page}}" style='width:250px; height:30px; color:#333333;'>
      <paper-tab id="sTab">S</paper-tab>
      <paper-tab id="uTab">U</paper-tab>
    </paper-tabs>

    <core-pages selected="{{page}}">
      <div id="s">
      <!--Page one -->
      </div>
      <div id="u">
      <!--Page two -->
      </div>
    </core-pages>
 </paper-dialog>

CSS:

paper-button 
{
margin-top:7%;
float:right;
margin-bottom: -15px;
background-color:#f0f0f0;
border-top: 1px solid #f0f0f0;
border-right: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
border-left: 1px solid #f0f0f0;
width:65px;
height:45px;
position:fixed;
margin-left:25%;

}

Upvotes: 0

Views: 131

Answers (1)

G&#252;nter Z&#246;chbauer
G&#252;nter Z&#246;chbauer

Reputation: 657476

If you use a paper-button you should use paper-button as selector. Why do you think button is a valid selector for a paper-button?

Upvotes: 1

Related Questions