@paperbits/common
Advanced tools
Comparing version 0.1.568 to 0.1.569
@@ -5,16 +5,20 @@ import { BehaviorHandle } from "./behavior"; | ||
export interface ActivateBehaviorOptions { | ||
data: unknown; | ||
onActivate: (data: unknown) => void; | ||
} | ||
export class ActivateBehavior { | ||
public static attach(element: HTMLElement, config: any): BehaviorHandle { | ||
public static attach(element: HTMLElement, config: ActivateBehaviorOptions): BehaviorHandle { | ||
const onActivate = config.onActivate; | ||
const data = config.data; | ||
const data = config.data; | ||
if (!onActivate) { | ||
console.warn(`Callback function for binding handler "activate" in undefined.`); | ||
return null; | ||
const handle: BehaviorHandle = { detach: () => { } }; | ||
return handle; | ||
} | ||
const callback = onActivate; //.bind(viewModel); | ||
const callback = onActivate; | ||
@@ -21,0 +25,0 @@ const onClick = (event: MouseEvent): void => { |
{ | ||
"name": "@paperbits/common", | ||
"version": "0.1.568", | ||
"version": "0.1.569", | ||
"description": "Paperbits common components.", | ||
@@ -5,0 +5,0 @@ "author": "Paperbits", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
430980
10844