willba-component-library 0.0.37 → 0.0.38
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/lib/components/FilterBar/FilterBar.d.ts +2 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.esm.js +4 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +4 -1
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.stories.tsx +1 -0
- package/src/components/FilterBar/FilterBar.tsx +9 -3
- package/src/i18n.ts +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
|
|
4
4
|
import Divider from './components/divider/Divider'
|
|
@@ -13,14 +13,20 @@ import useTheme from '../../themes/useTheme'
|
|
|
13
13
|
|
|
14
14
|
import './FilterBar.css'
|
|
15
15
|
import '../../themes/Default.css'
|
|
16
|
-
import '../../i18n'
|
|
16
|
+
import i18n from '../../i18n'
|
|
17
17
|
|
|
18
18
|
type FilterBarProps = {
|
|
19
19
|
vendor?: string
|
|
20
|
+
language?: string
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
export default function FilterBar({ vendor }: FilterBarProps) {
|
|
23
|
+
export default function FilterBar({ vendor, language }: FilterBarProps) {
|
|
23
24
|
// useTheme({ vendor })
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
i18n.changeLanguage(language)
|
|
28
|
+
}, [language])
|
|
29
|
+
|
|
24
30
|
const { t } = useTranslation('filterBar')
|
|
25
31
|
|
|
26
32
|
const {
|