@balby/booking-search 1.0.4 → 1.0.5
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/README.md +11 -9
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -42,22 +42,24 @@ npm install react react-dom tailwindcss
|
|
|
42
42
|
|
|
43
43
|
### Importing Styles
|
|
44
44
|
|
|
45
|
-
This package requires you to import the CSS file.
|
|
45
|
+
This package requires you to import the CSS file. Choose one of the following methods:
|
|
46
46
|
|
|
47
|
-
**Option 1:
|
|
47
|
+
**Option 1: Import in your JavaScript/TypeScript (Recommended)**
|
|
48
48
|
```tsx
|
|
49
49
|
import '@balby/booking-search/styles'
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
**Option 2:
|
|
52
|
+
**Option 2: Import in your global CSS file**
|
|
53
|
+
```css
|
|
54
|
+
@import '@balby/booking-search/styles';
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Option 3: Direct path import**
|
|
53
58
|
```tsx
|
|
54
59
|
import '@balby/booking-search/dist/index.css'
|
|
55
60
|
```
|
|
56
61
|
|
|
57
|
-
**
|
|
58
|
-
```css
|
|
59
|
-
@import '@balby/booking-search/styles';
|
|
60
|
-
```
|
|
62
|
+
> **Note:** All import methods are supported. Choose the one that best fits your build setup.
|
|
61
63
|
|
|
62
64
|
## 🎯 Quick Start
|
|
63
65
|
|
|
@@ -68,9 +70,9 @@ import '@balby/booking-search/dist/index.css'
|
|
|
68
70
|
```tsx
|
|
69
71
|
import { BookingSearch } from '@balby/booking-search'
|
|
70
72
|
import '@balby/booking-search/styles'
|
|
71
|
-
import type { BookingSearchPayload,
|
|
73
|
+
import type { BookingSearchPayload, SearchLocation, AvailabilityDay } from '@balby/booking-search'
|
|
72
74
|
|
|
73
|
-
const locations:
|
|
75
|
+
const locations: SearchLocation[] = [
|
|
74
76
|
{ id: '1', name: 'Rome, Italy', type: 'City', countryCode: 'IT' },
|
|
75
77
|
{ id: '2', name: 'Florence, Italy', type: 'City', countryCode: 'IT' },
|
|
76
78
|
]
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balby/booking-search",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Framework-agnostic React component for booking search, inspired by Booking.com",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"module": "./dist/index.js",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
"import": "./dist/index.js",
|
|
17
17
|
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
|
-
"./styles":
|
|
19
|
+
"./styles": {
|
|
20
|
+
"import": "./dist/index.css",
|
|
21
|
+
"require": "./dist/index.css",
|
|
22
|
+
"default": "./dist/index.css"
|
|
23
|
+
},
|
|
24
|
+
"./dist/index.css": "./dist/index.css"
|
|
20
25
|
},
|
|
21
26
|
"files": [
|
|
22
27
|
"dist",
|