willba-component-library 0.1.0 → 0.1.2
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 +20 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,29 +26,32 @@ ReactDOM.render(<App />, document.querySelector('#app'))
|
|
|
26
26
|
|
|
27
27
|
or you can add the willba-component-library using scripts:
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
```html
|
|
30
|
+
<div id="will-filter-bar" style="max-width: 1200px"></div>
|
|
30
31
|
|
|
31
32
|
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
|
|
32
33
|
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
|
|
33
34
|
<script src="https://cdn.jsdelivr.net/npm/willba-component-library@0.0.90/lib/index.umd.js"></script>
|
|
34
35
|
|
|
35
36
|
<script>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
const filterBarElement = React.createElement
|
|
38
|
+
const filterBarContainer = document.getElementById('will-filter-bar')
|
|
39
|
+
const WillFilterBar = WillbaComponentLibrary.FilterBar
|
|
40
|
+
|
|
41
|
+
ReactDOM.render(
|
|
42
|
+
filterBarElement(WillFilterBar, {
|
|
43
|
+
redirectUrl: 'http://localhost:3000/',
|
|
44
|
+
}),
|
|
45
|
+
filterBarContainer
|
|
46
|
+
)
|
|
46
47
|
</script>
|
|
48
|
+
```
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
## Props of FilterBar
|
|
49
51
|
|
|
50
|
-
| Name | Value | Description
|
|
51
|
-
| ------------- | ------------- |
|
|
52
|
-
| redirectUrl | `"string"` | Define the URL where the component showld redirect on filtering.
|
|
53
|
-
| language | `"fi" , "en"` | Specify the language, available languages Finnish and English
|
|
54
|
-
| ageCategories | `[{}]` | Specify age categories for guests filter: [{id: string, name: string, minAge: number
|
|
52
|
+
| Name | Value | Description |
|
|
53
|
+
| ------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
54
|
+
| redirectUrl | `"string"` | Define the URL where the component showld redirect on filtering. |
|
|
55
|
+
| language | `"fi" , "en"` | Specify the language, available languages Finnish and English. |
|
|
56
|
+
| ageCategories | `[{}]` | Specify age categories for guests filter: [{id: string, name: string, minAge: number , maxAge: number , minVal: number}] |
|
|
57
|
+
| vendor | `"string"` | Add vendor name for custom theme. |
|