@pro6pp/infer-react 0.0.2-beta.8 → 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 CHANGED
@@ -43,6 +43,40 @@ You can customize the appearance of the component via the following props:
43
43
  | `renderItem` | A custom render function for suggestion items, receiving the `item` and `isActive` state. |
44
44
  | `renderNoResults` | A custom render function for the empty state, receiving the current `state`. |
45
45
  | `debounceMs` | Delay in ms before API search. Defaults to `150` (min `50`). |
46
+ | `maxRetries` | Maximum retry attempts for transient network errors. Valid range: `0` to `10`. |
47
+ | `showClearButton` | If `true`, displays a button to empty the input field. Defaults to `true`. |
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
+ ```
46
80
 
47
81
  ---
48
82