nicnacnic
nicnacnic

Reputation: 3

Polymer paper-dropdown-menu not appearing correctly

I'm trying to set up some Polymer modules for a project I'm working on. In the code below, the button works just fine but when I import the dropdown, it appears weirdly. This code comes straight from the docs, but doesn't work. I suspect that I'm missing a dependency, but it's not mentioned anywhere in the docs.
Thanks!

<html>
  <head>
    <script type="module" src="/node_modules/@polymer/paper-button/paper-button.js"></script>
    <script type="module" src="/node_modules/@polymer/paper-dropdown-menu/paper-dropdown-menu.js"></script>
    <script type="module" src="/node_modules/@polymer/paper-item/paper-item.js"></script>
    <script type="module" src="/node_modules/@polymer/paper-listbox/paper-listbox.js"></script>
</head>
  <body>
    <paper-button raised class="indigo">raised</paper-button>
    <paper-dropdown-menu label="Dinosaurs">
      <paper-listbox slot="dropdown-content" class="dropdown-content">
        <paper-item>allosaurus</paper-item>
        <paper-item>brontosaurus</paper-item>
        <paper-item>carcharodontosaurus</paper-item>
        <paper-item>diplodocus</paper-item>
      </paper-listbox>
    </paper-dropdown-menu>
  </body>
</html>

Result

Upvotes: 0

Views: 85

Answers (1)

user8219022
user8219022

Reputation:

What exactly is the class="dropdown-content" doing in the paper-listbox element?

Upvotes: 0

Related Questions