3.0.1 • Published 5 years ago
@advanced-rest-client/arc-onboarding v3.0.1
arc-onboarding
On-boarding tutorial for Advanced REST Client.
Usage
Installation
npm install --save @advanced-rest-client/arc-onboarding
In a LitELement template
import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/arc-onboarding/arc-onboarding.js';
class SampleElement extends LitElement {
render() {
return html`
<arc-onboarding opened @tutorial-close="${this._closeHandler}"></arc-onboarding>
`;
}
_closeHandler() {
localStorage.setItem('tutorial-passed', 'true');
}
}
customElements.define('sample-element', SampleElement);
Running the tutorial
The application should store the information when the tutorial was passed and skip
initialization when the user finished it. Handle the tutorial-close
event to
set flag in the store.
This event is not dispatched when the user cancelled the dialog (ESC key for example).
Development
git clone https://github.com/advanced-rest-client/arc-onboarding
cd arc-onboarding
npm i
Running the demo locally
npm start
Running the tests
npm test