@sme.up/ketchup-react
Advanced tools
Comparing version 8.3.2 to 8.3.3
export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void; | ||
export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string; | ||
/** | ||
* Transforms a React event name to a browser event name. | ||
*/ | ||
export declare const transformReactEventName: (eventNameSuffix: string) => string; | ||
/** | ||
* Checks if an event is supported in the current execution environment. | ||
@@ -5,0 +9,0 @@ * @license Modernizr 3.0.0pre (Custom Build) | MIT |
@@ -61,2 +61,12 @@ import { camelToDashCase } from './case'; | ||
/** | ||
* Transforms a React event name to a browser event name. | ||
*/ | ||
export const transformReactEventName = (eventNameSuffix) => { | ||
switch (eventNameSuffix) { | ||
case 'doubleclick': | ||
return 'dblclick'; | ||
} | ||
return eventNameSuffix; | ||
}; | ||
/** | ||
* Checks if an event is supported in the current execution environment. | ||
@@ -70,3 +80,3 @@ * @license Modernizr 3.0.0pre (Custom Build) | MIT | ||
else { | ||
const eventName = 'on' + eventNameSuffix; | ||
const eventName = 'on' + transformReactEventName(eventNameSuffix); | ||
let isSupported = eventName in document; | ||
@@ -73,0 +83,0 @@ if (!isSupported) { |
{ | ||
"name": "@sme.up/ketchup-react", | ||
"version": "8.3.2", | ||
"version": "8.3.3", | ||
"module": "dist/index.js", | ||
@@ -23,3 +23,3 @@ "typings": "dist/index.d.ts", | ||
"dependencies": { | ||
"@sme.up/ketchup": "^8.3.2", | ||
"@sme.up/ketchup": "^8.3.3", | ||
"react": "^18.2.0", | ||
@@ -26,0 +26,0 @@ "react-dom": "^18.2.0" |
36410
562
Updated@sme.up/ketchup@^8.3.3