3.0.0-preview.1 • Published 7 years ago
@api-components/authorization-panel v3.0.0-preview.1
<authorization-panel>
A set of elements that contains an UI to create different authorization headers like Basic, OAuth etc
<authorization-panel></authorization-panel>API components
This components is a part of API components ecosystem
Usage
Installation
npm install --save @advanced-rest-client/authorization-panelIn an html file
<html>
<head>
<script type="module">
import '@advanced-rest-client/authorization-panel/authorization-panel.js';
</script>
</head>
<body>
<authorization-panel></authorization-panel>
</body>
</html>In a Polymer 3 element
import {PolymerElement, html} from '@polymer/polymer';
import '@advanced-rest-client/authorization-panel/authorization-panel.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<authorization-panel on-authorization-settings-changed="_authChanged"></authorization-panel>
`;
}
_authChanged(e) {
console.log(e.detail);
}
}
customElements.define('sample-element', SampleElement);Installation
git clone https://github.com/advanced-rest-client/authorization-panel
cd api-url-editor
npm install
npm install -g polymer-cliRunning the demo locally
polymer serve --npm
open http://127.0.0.1:<port>/demo/Running the tests
polymer test --npm