A Collection of web component build with Stencil
It is based on MomentJS and use HammerJS for the gestures.
Components
npm i hado-ui or yarn add hado-ui
How to use in Angular :
1 - Add the script in the .angular-cli.json :
"assets": ,
2 - Add the script tag in the main index.html :
3 - Add the CUSTOM_ELEMENTS_SCHEMA in the main module :
4 - Add the component in your template :
// Change the ref in Angular use :this.config.value_to_change = newValue;
How to use in Vue :
npm i @stencil/webpack or yarn add @stencil/webpack
// webpack.base.conf.jsconst stencil = ;const StencilComponent = collections : '../node_modules/hado-ui/dist' ;moduleexport = plugins: StencilComponent
// main.js;VueconfigignoredElements = 'st-';
<!-- vue files -->
How to use in React :
For React you can use @stencil/webpack ( must eject the webpack config ) like Vue or copy the dist folder into your public folder.
// add the script on the index.html
For the moment you can't use the React props binding until the React 17 so you will do like a vanilla :
// define a statethisstate = config: ...; // component calendar Refthiscalendar; { thiscalendar = document; // Await the component mounting thiscalendar} // If your state change { thisstateconfig !== prevStateconfig ? thiscalendar : null}
How to use in Vanilla Js :
2 - Add scripts on the top of the index.html :
...
2 - Add the script tag on the bottom of the index.html :