开源软件名称(OpenSource Name):PolymerElements/paper-toolbar开源软件地址(OpenSource Url):https://github.com/PolymerElements/paper-toolbar开源编程语言(OpenSource Language):JavaScript 65.4%开源软件介绍(OpenSource Introduction):<paper-toolbar>This element has been deprecated in favor of app-layout.
Example: <paper-toolbar>
<paper-icon-button slot="top" icon="menu" on-tap="menuAction"></paper-icon-button>
<div slot="top" class="title">Title</div>
<paper-icon-button slot="top" icon="more-vert" on-tap="moreAction"></paper-icon-button>
</paper-toolbar>
<paper-toolbar class="tall">
<paper-icon-button slot="top" icon="menu"></paper-icon-button>
</paper-toolbar> Apply <paper-toolbar class="medium-tall">
<paper-icon-button slot="top" icon="menu"></paper-icon-button>
</paper-toolbar> When <paper-toolbar class="tall">
<paper-icon-button slot="top" icon="menu"></paper-icon-button>
<div slot="middle" class="title">Middle Title</div>
<div slot="bottom" class="title">Bottom Title</div>
</paper-toolbar> For To make an element completely fit at the bottom of the toolbar, use <paper-toolbar class="tall">
<div id="progressBar" slot="bottom" class="fit"></div>
</paper-toolbar> When inside a StylingThe following custom properties and mixins are available for styling:
Accessibility
See: Documentation, Demo. UsageInstallation
In an html file<html>
<head>
<script type="module">
import '@polymer/paper-toolbar/paper-toolbar.js';
</script>
</head>
<body>
<paper-toolbar>
<div slot="top" class="title">Title</div>
</paper-toolbar>
</body>
</html> In a Polymer 3 elementimport {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-toolbar/paper-toolbar.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<paper-toolbar>
<div slot="top" class="title">Title</div>
</paper-toolbar>
`;
}
}
customElements.define('sample-element', SampleElement); ContributingIf you want to send a PR to this element, here are the instructions for running the tests and demo locally: Installationgit clone https://github.com/PolymerElements/paper-toolbar
cd paper-toolbar
npm install
npm install -g polymer-cli Running the demo locallypolymer serve --npm
open http://127.0.0.1:<port>/demo/ Running the testspolymer test --npm |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论