@claudebernard/side-effects-element
v0.0.16
Published
An element providing some custom stuff.
Downloads
24
Readme
<bcb-my-custom> element
An element providing some custom stuff.
Installation
npm install --save @claudebernard/my-custom-element
Usage
Script
Import as ES modules:
import '@claudebernard/my-custom-element';
With a script tag:
<script type="module" src="node_modules/@claudebernard/my-custom-element/dist/my-custom.js"></script>
HTML
<bcb-my-custom apiurl="https://api.claudebernard.fr"></bcb-my-custom>
Attributes
| Name | Type | Default | Description |
|----------|----------|--------------------------------|--------------------------------------------------------------------------------------|
| apiurl
| URL
| https://api.claudebernard.fr
| API base URL to call to do some stuff |
| lang
| String
| fr-FR
| UI display locale. Available : - French (France) : fr-FR
- English: en
|
Events
| Name | Type | Format | Description |
|----------------|----------------|-------------------------------------------|----------------------------|
| new-cat-fact
| CatFactEvent
| { fact: { fact: string, length: int } }
| User got a fact about cats |
Browser support
Browsers without native custom element support require a polyfill.
- [x] Chrome
- [x] Firefox
- [x] Safari
- [x] Microsoft Edge
Custom element checklist
- [ ] Public documentation (docs portal)
- [ ] Functional on Angular, React, Vue
- [ ] Unit tested
- [ ] Code quality
- [ ] Changelog with semantic release
- [ ] Available in offline mode
- [ ] Best practices compliant
- [ ] Validated by QA
- [ ] Publicly available
- [ ] Based on FHIR
- [ ] Example on storybook
- [ ] Available demo
- [x] i18n
- [x] Browser support section
- [ ] EOL section
License
Copyright of Cegedim. See LICENSE for details.