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/esm/index.js
CHANGED
|
@@ -2553,15 +2553,8 @@ function FilterBar() {
|
|
|
2553
2553
|
React.createElement(Divider, null),
|
|
2554
2554
|
React.createElement(SelectButton, { label: "End date", onClick: () => handleSelectedFilter(2) }),
|
|
2555
2555
|
React.createElement(Divider, null),
|
|
2556
|
-
React.createElement(SelectButton, { label: "Guests", onClick: () => handleSelectedFilter(3) }),
|
|
2557
2556
|
React.createElement(Divider, null),
|
|
2558
|
-
React.createElement(
|
|
2559
|
-
React.createElement(SubmitButton, { onClick: handleSubmit })),
|
|
2560
|
-
selectedFilter && (React.createElement("div", { className: "search-widget-container" },
|
|
2561
|
-
selectedFilter === 1 && React.createElement(StartDate, null),
|
|
2562
|
-
selectedFilter === 2 && React.createElement(EndDate, null),
|
|
2563
|
-
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) })),
|
|
2564
|
-
selectedFilter === 4 && (React.createElement(Categories, { categories: categories, setCategories: setCategories }))))));
|
|
2557
|
+
React.createElement(SubmitButton, { onClick: handleSubmit }))));
|
|
2565
2558
|
}
|
|
2566
2559
|
const Divider = () => {
|
|
2567
2560
|
return React.createElement("div", { className: "search-widget-divider" });
|
|
@@ -2572,43 +2565,69 @@ const SubmitButton = ({ onClick }) => {
|
|
|
2572
2565
|
const SelectButton = ({ label, onClick }) => {
|
|
2573
2566
|
return (React.createElement("button", { className: "search-widget-select-button", onClick: onClick }, label));
|
|
2574
2567
|
};
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2577
|
-
|
|
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
|
-
}
|
|
2568
|
+
// const Guests = ({
|
|
2569
|
+
// guestsAdults,
|
|
2570
|
+
// guestsKids,
|
|
2571
|
+
// decrementAdults,
|
|
2572
|
+
// incrementAdults,
|
|
2573
|
+
// decrementKids,
|
|
2574
|
+
// incrementKids,
|
|
2575
|
+
// }: any) => {
|
|
2576
|
+
// return (
|
|
2577
|
+
// <div className="search-widget-guests">
|
|
2578
|
+
// <h3>Guests</h3>
|
|
2579
|
+
// <p>Who's coming?</p>
|
|
2580
|
+
// <div className="guests-filter-container">
|
|
2581
|
+
// <div className="guests-filter-inner">
|
|
2582
|
+
// <span>Adults</span>
|
|
2583
|
+
// <div>
|
|
2584
|
+
// <button onClick={decrementAdults} disabled={guestsAdults < 1}>
|
|
2585
|
+
// -
|
|
2586
|
+
// </button>
|
|
2587
|
+
// <span>{guestsAdults}</span>
|
|
2588
|
+
// <button onClick={incrementAdults}>+</button>
|
|
2589
|
+
// </div>
|
|
2590
|
+
// </div>
|
|
2591
|
+
// <div className="guests-filter-inner">
|
|
2592
|
+
// <span>Kids</span>
|
|
2593
|
+
// <div>
|
|
2594
|
+
// <button onClick={decrementKids} disabled={guestsKids < 1}>
|
|
2595
|
+
// -
|
|
2596
|
+
// </button>
|
|
2597
|
+
// <span>{guestsKids}</span>
|
|
2598
|
+
// <button onClick={incrementKids}>+</button>
|
|
2599
|
+
// </div>
|
|
2600
|
+
// </div>
|
|
2601
|
+
// </div>
|
|
2602
|
+
// </div>
|
|
2603
|
+
// )
|
|
2604
|
+
// }
|
|
2605
|
+
// const Categories = ({ categories, setCategories }: any) => {
|
|
2606
|
+
// const categoriesPlaceholder = ['Weekend', 'Week', 'Summer camp', 'Winter camp']
|
|
2607
|
+
// const [selectedCategory, setSelectedCategory] = useState('')
|
|
2608
|
+
// const handleCategoryChange = (selectedCategory: any) => {
|
|
2609
|
+
// setSelectedCategory(selectedCategory)
|
|
2610
|
+
// setCategories(selectedCategory) // Update the parent component's state with the selected category
|
|
2611
|
+
// }
|
|
2612
|
+
// return (
|
|
2613
|
+
// <div className="search-widget-categories">
|
|
2614
|
+
// <h3>CATEGORY</h3>
|
|
2615
|
+
// <div className="categories-filter-inner">
|
|
2616
|
+
// {categoriesPlaceholder.map((itm, idx) => (
|
|
2617
|
+
// <div key={idx}>
|
|
2618
|
+
// <input
|
|
2619
|
+
// type="radio"
|
|
2620
|
+
// value={itm}
|
|
2621
|
+
// checked={selectedCategory === itm}
|
|
2622
|
+
// onChange={() => handleCategoryChange(itm)}
|
|
2623
|
+
// />
|
|
2624
|
+
// <span>{itm}</span>
|
|
2625
|
+
// </div>
|
|
2626
|
+
// ))}
|
|
2627
|
+
// </div>
|
|
2628
|
+
// </div>
|
|
2629
|
+
// )
|
|
2630
|
+
// }
|
|
2612
2631
|
|
|
2613
2632
|
export { Button, FilterBar };
|
|
2614
2633
|
//# sourceMappingURL=index.js.map
|