Skip to content

Commit 6c49e18

Browse files
author
vvo
committed
fix: widgets.searchbox => widgets.searchBox
Widgets names should be camel case to avoid future issues like widgets.wowwidget
1 parent 9309a4c commit 6c49e18

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

example/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var instant = new instantsearch.InstantSearch(
99
);
1010

1111
instant.addWidget(
12-
instantsearch.widgets.searchbox({
12+
instantsearch.widgets.searchBox({
1313
container: '#search-box',
1414
placeholder: 'Search for products',
1515
addClass: 'form-control'

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module.exports = {
44
InstantSearch: require('./lib/InstantSearch'),
55
widgets: {
6-
searchbox: require('./widgets/searchbox'),
7-
results: require('./widgets/hits')
6+
searchBox: require('./widgets/search-box/'),
87
}
98
};

widgets/searchbox/index.js renamed to widgets/search-box/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function searchbox(params) {
1616
setQuery={bind(helper.setQuery, helper)}
1717
search={bind(helper.search, helper)}
1818
placeholder={params.placeholder}
19-
inputClass={params.addClass} />, container
19+
inputClass={params.cssClass} />, container
2020
);
2121
}
2222
};

0 commit comments

Comments
 (0)