gm-web-component
v1.0.2
Published
Modal like web component
Downloads
4
Readme
GM-WEB-COMPONENT
#Using gm-web-component my-array -> acceps array of objects with title,img,destination show-modal -> true or false to display modal background-color -> background of modal text-color -> color of text
#angular usage add CUSTOM_ELEMENTS_SCHEMA to your app.module.ts import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core"; schemas: [CUSTOM_ELEMENTS_SCHEMA]
add defineCustomElements to main.ts
import { defineCustomElements } from "testing-component-baki/loader"
defineCustomElements(window);
******* Add this to every module where you use component *********
#react usage add applyPolyfills, defineCustomElements to your index.js import { applyPolyfills, defineCustomElements } from "testing-component-baki/loader"; in you component where you use gm-web-component add import "testing-component-baki";
extra note Binding in react works fine for array..you need to convert it to json Binding in angular is a little bit tricky..you will have to add array with setAttribute('my-array',JSON.stringify(arrayForConverting))
*** If any bug is founded send me mail :) **** [email protected]