@huddle01/iframe
Advanced tools
Comparing version 0.0.11-alpha.5 to 0.0.11-alpha.6
@@ -29,3 +29,3 @@ import HuddleIframe from './components/HuddleIframe'; | ||
}; | ||
declare const useEventListner: <K extends keyof THuddleEventsMap>(huddleEvent: K, cb: (data: THuddleEventsMap[K][0]) => void) => void; | ||
declare const useEventListner: <K extends keyof THuddleEventsMap>(huddleEvent: K, cb: (data: THuddleEventsMap[K][0]) => void, dep?: unknown[]) => void; | ||
export { HuddleIframe, iframeApi, useEventListner }; |
@@ -423,3 +423,3 @@ 'use strict'; | ||
rest = _objectWithoutProperties(_ref, _excluded); | ||
React.useEffect(function () { | ||
useEventListner('app:initialized', function () { | ||
if (theme) { | ||
@@ -571,3 +571,3 @@ sendDataToIframe({ | ||
var useEventListner = function useEventListner(huddleEvent, cb) { | ||
var useEventListner = function useEventListner(huddleEvent, cb, dep) { | ||
React.useEffect(function () { | ||
@@ -583,3 +583,3 @@ var handleIframe = function handleIframe(event) { | ||
}; | ||
}, []); | ||
}, dep ? [dep] : []); | ||
}; | ||
@@ -586,0 +586,0 @@ |
@@ -423,3 +423,3 @@ 'use strict'; | ||
rest = _objectWithoutProperties(_ref, _excluded); | ||
React.useEffect(function () { | ||
useEventListner('app:initialized', function () { | ||
if (theme) { | ||
@@ -571,3 +571,3 @@ sendDataToIframe({ | ||
var useEventListner = function useEventListner(huddleEvent, cb) { | ||
var useEventListner = function useEventListner(huddleEvent, cb, dep) { | ||
React.useEffect(function () { | ||
@@ -583,3 +583,3 @@ var handleIframe = function handleIframe(event) { | ||
}; | ||
}, []); | ||
}, dep ? [dep] : []); | ||
}; | ||
@@ -586,0 +586,0 @@ |
@@ -415,3 +415,3 @@ import React, { useEffect } from 'react'; | ||
rest = _objectWithoutProperties(_ref, _excluded); | ||
useEffect(function () { | ||
useEventListner('app:initialized', function () { | ||
if (theme) { | ||
@@ -563,3 +563,3 @@ sendDataToIframe({ | ||
var useEventListner = function useEventListner(huddleEvent, cb) { | ||
var useEventListner = function useEventListner(huddleEvent, cb, dep) { | ||
useEffect(function () { | ||
@@ -575,5 +575,5 @@ var handleIframe = function handleIframe(event) { | ||
}; | ||
}, []); | ||
}, dep ? [dep] : []); | ||
}; | ||
export { HuddleIframe, iframeApi, useEventListner }; |
{ | ||
"name": "@huddle01/iframe", | ||
"version": "0.0.11-alpha.5", | ||
"version": "0.0.11-alpha.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/huddle01-iframe.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
652211