niris-public-community-components
v0.0.2
Published
Web components for the NIRIS project developed with the Lit library
Downloads
6
Maintainers
Readme
Niris web components
This library contains two web components:
<textarea-to-iris>
: Web component to, when clicking a button, show a textarea and be able to enter the suggestion or complaint there, when submitting, it will redirect us to the public website of Niris (configurable by property)
<niris-form>
: TODO...
Prerequisites
Table of contents
How to use
Installation
- Install with npm
$ npm install public-community-components
CDN
npm CDNs like unpkg.com can directly serve files that have been published to npm. This works great for standard JavaScript modules that the browser can load natively.
For this element to work from unpkg.com specifically, you need to include the ?module query parameter, which tells unpkg.com to rewrite "bare" module specifiers to full URLs.
HTML
<script type="module" src="https://unpkg.com/my-element?module"></script>
Javascript
import {MyElement} from 'https://unpkg.com/my-element?module';
Initialization
- HTML way
<data-grid data-url="data.json"></data-grid>
<script type="module" src="./data-grid.js"></script>
Styling
textarea-to-niris {
--primary-color: #007bff;
--background-color: #d4d4d4;
--color: #fff;
--padding: 1rem 1rem;
--font-size: 1rem;
--border-radius: 0rem;
--font-weight: 500;
--font-family: 'Arial', sans-serif;
}
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Francisco Fernandez - Initial work - Github
License
BSD 3-Clause License © Andrea SonnY