willba-component-library 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +64 -45
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +64 -45
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2555,15 +2555,8 @@ function FilterBar() {
|
|
|
2555
2555
|
React.createElement(Divider, null),
|
|
2556
2556
|
React.createElement(SelectButton, { label: "End date", onClick: () => handleSelectedFilter(2) }),
|
|
2557
2557
|
React.createElement(Divider, null),
|
|
2558
|
-
React.createElement(SelectButton, { label: "Guests", onClick: () => handleSelectedFilter(3) }),
|
|
2559
2558
|
React.createElement(Divider, null),
|
|
2560
|
-
React.createElement(
|
|
2561
|
-
React.createElement(SubmitButton, { onClick: handleSubmit })),
|
|
2562
|
-
selectedFilter && (React.createElement("div", { className: "search-widget-container" },
|
|
2563
|
-
selectedFilter === 1 && React.createElement(StartDate, null),
|
|
2564
|
-
selectedFilter === 2 && React.createElement(EndDate, null),
|
|
2565
|
-
selectedFilter === 3 && (React.createElement(Guests, { guestsAdults: guestsAdults, guestsKids: guestsKids, decrementAdults: () => setGuestsAdults(guestsAdults - 1), incrementAdults: () => setGuestsAdults(guestsAdults + 1), decrementKids: () => setGuestsKids(guestsKids - 1), incrementKids: () => setGuestsKids(guestsKids + 1) })),
|
|
2566
|
-
selectedFilter === 4 && (React.createElement(Categories, { categories: categories, setCategories: setCategories }))))));
|
|
2559
|
+
React.createElement(SubmitButton, { onClick: handleSubmit }))));
|
|
2567
2560
|
}
|
|
2568
2561
|
const Divider = () => {
|
|
2569
2562
|
return React.createElement("div", { className: "search-widget-divider" });
|
|
@@ -2574,43 +2567,69 @@ const SubmitButton = ({ onClick }) => {
|
|
|
2574
2567
|
const SelectButton = ({ label, onClick }) => {
|
|
2575
2568
|
return (React.createElement("button", { className: "search-widget-select-button", onClick: onClick }, label));
|
|
2576
2569
|
};
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
}
|
|
2570
|
+
// const Guests = ({
|
|
2571
|
+
// guestsAdults,
|
|
2572
|
+
// guestsKids,
|
|
2573
|
+
// decrementAdults,
|
|
2574
|
+
// incrementAdults,
|
|
2575
|
+
// decrementKids,
|
|
2576
|
+
// incrementKids,
|
|
2577
|
+
// }: any) => {
|
|
2578
|
+
// return (
|
|
2579
|
+
// <div className="search-widget-guests">
|
|
2580
|
+
// <h3>Guests</h3>
|
|
2581
|
+
// <p>Who's coming?</p>
|
|
2582
|
+
// <div className="guests-filter-container">
|
|
2583
|
+
// <div className="guests-filter-inner">
|
|
2584
|
+
// <span>Adults</span>
|
|
2585
|
+
// <div>
|
|
2586
|
+
// <button onClick={decrementAdults} disabled={guestsAdults < 1}>
|
|
2587
|
+
// -
|
|
2588
|
+
// </button>
|
|
2589
|
+
// <span>{guestsAdults}</span>
|
|
2590
|
+
// <button onClick={incrementAdults}>+</button>
|
|
2591
|
+
// </div>
|
|
2592
|
+
// </div>
|
|
2593
|
+
// <div className="guests-filter-inner">
|
|
2594
|
+
// <span>Kids</span>
|
|
2595
|
+
// <div>
|
|
2596
|
+
// <button onClick={decrementKids} disabled={guestsKids < 1}>
|
|
2597
|
+
// -
|
|
2598
|
+
// </button>
|
|
2599
|
+
// <span>{guestsKids}</span>
|
|
2600
|
+
// <button onClick={incrementKids}>+</button>
|
|
2601
|
+
// </div>
|
|
2602
|
+
// </div>
|
|
2603
|
+
// </div>
|
|
2604
|
+
// </div>
|
|
2605
|
+
// )
|
|
2606
|
+
// }
|
|
2607
|
+
// const Categories = ({ categories, setCategories }: any) => {
|
|
2608
|
+
// const categoriesPlaceholder = ['Weekend', 'Week', 'Summer camp', 'Winter camp']
|
|
2609
|
+
// const [selectedCategory, setSelectedCategory] = useState('')
|
|
2610
|
+
// const handleCategoryChange = (selectedCategory: any) => {
|
|
2611
|
+
// setSelectedCategory(selectedCategory)
|
|
2612
|
+
// setCategories(selectedCategory) // Update the parent component's state with the selected category
|
|
2613
|
+
// }
|
|
2614
|
+
// return (
|
|
2615
|
+
// <div className="search-widget-categories">
|
|
2616
|
+
// <h3>CATEGORY</h3>
|
|
2617
|
+
// <div className="categories-filter-inner">
|
|
2618
|
+
// {categoriesPlaceholder.map((itm, idx) => (
|
|
2619
|
+
// <div key={idx}>
|
|
2620
|
+
// <input
|
|
2621
|
+
// type="radio"
|
|
2622
|
+
// value={itm}
|
|
2623
|
+
// checked={selectedCategory === itm}
|
|
2624
|
+
// onChange={() => handleCategoryChange(itm)}
|
|
2625
|
+
// />
|
|
2626
|
+
// <span>{itm}</span>
|
|
2627
|
+
// </div>
|
|
2628
|
+
// ))}
|
|
2629
|
+
// </div>
|
|
2630
|
+
// </div>
|
|
2631
|
+
// )
|
|
2632
|
+
// }
|
|
2614
2633
|
|
|
2615
2634
|
exports.Button = Button;
|
|
2616
2635
|
exports.FilterBar = FilterBar;
|