@pro6pp/infer-react 0.0.2-beta.9 → 0.1.0-beta.19
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 +32 -1
- package/dist/index.cjs +562 -270
- package/dist/index.d.cts +24 -13
- package/dist/index.d.ts +24 -13
- package/dist/index.js +570 -271
- package/dist/styles.css +203 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -45,7 +45,38 @@ You can customize the appearance of the component via the following props:
|
|
|
45
45
|
| `debounceMs` | Delay in ms before API search. Defaults to `150` (min `50`). |
|
|
46
46
|
| `maxRetries` | Maximum retry attempts for transient network errors. Valid range: `0` to `10`. |
|
|
47
47
|
| `showClearButton` | If `true`, displays a button to empty the input field. Defaults to `true`. |
|
|
48
|
-
| `
|
|
48
|
+
| `loadingText` | The text displayed at the bottom of the list when fetching more results. |
|
|
49
|
+
|
|
50
|
+
## Styling
|
|
51
|
+
|
|
52
|
+
By default, the component auto-injects the necessary CSS. You have several options:
|
|
53
|
+
|
|
54
|
+
### Option 1: Use auto-injected styles (default)
|
|
55
|
+
|
|
56
|
+
No extra setup needed. The CSS is embedded and injected automatically.
|
|
57
|
+
|
|
58
|
+
### Option 2: Import CSS separately
|
|
59
|
+
|
|
60
|
+
If you prefer to import the CSS file directly:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { Pro6PPInfer } from '@pro6pp/infer-react';
|
|
64
|
+
import '@pro6pp/infer-react/styles.css';
|
|
65
|
+
|
|
66
|
+
<Pro6PPInfer
|
|
67
|
+
authKey="..."
|
|
68
|
+
country="NL"
|
|
69
|
+
disableDefaultStyles // disable auto-injection since we imported the CSS
|
|
70
|
+
/>;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Option 3: Fully custom styles
|
|
74
|
+
|
|
75
|
+
Set `disableDefaultStyles` and provide your own CSS targeting the `.pro6pp-*` classes:
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
<Pro6PPInfer authKey="..." country="NL" disableDefaultStyles className="my-custom-wrapper" />
|
|
79
|
+
```
|
|
49
80
|
|
|
50
81
|
---
|
|
51
82
|
|