@sakai-ui/sui-element
v3.0.6
Published
A base class for Sakai UI web components
Downloads
3
Readme
sui-element
A base class for Sakai UI elements. It renders to the light dom and gives us the loadTranslations and tr methods.
Installation
npm i @sakai-ui/sui-element
Usage
import { SuiElement } from "@sakai-ui/sui-element";
class MyElement extends SuiElement {
constructor() {
super();
this.loadTransations("myelement").then(r => { this.i18n = r; this.requestUpdate(); });
}
...
}
Linting and formatting
To scan the project for linting and formatting errors, run
npm run lint
To automatically fix linting and formatting errors, run
npm run format
Testing with Web Test Runner
To execute a single test run:
npm run test
To run the tests in interactive watch mode run:
npm run test:watch