Skip to content

Commit a119933

Browse files
authored
Work for underscore events
Quick fix for prop event names with underscores i.e. `bounds changed` becomes `Bounds_changed` with current camelize, so prop name has to be `onBounds_changed`. This fixes it so that the prop name will be `onBoundsChanged`
1 parent f3c70a6 commit a119933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/String.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const camelize = function(str) {
2-
return str.split(' ').map(function(word) {
2+
return str.split('_').map(function(word) {
33
return word.charAt(0).toUpperCase() + word.slice(1);
44
}).join('');
55
}

0 commit comments

Comments
 (0)