@energie360/ui-library 1.1.0 → 1.1.1

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.
@@ -29,4 +29,9 @@
29
29
  .button-tile__left {
30
30
  display: flex;
31
31
  flex-direction: column;
32
+ hyphens: auto;
33
+ }
34
+
35
+ .button-tile__right {
36
+ flex: 0 0 auto;
32
37
  }
package/globals.js CHANGED
@@ -6,6 +6,6 @@
6
6
  // TODO: Find a more 'generic' way to set an environment variable when using/developing the library.
7
7
  // In the meantime we'll just use this fixed path for the ui-assets.
8
8
 
9
- const assetsPathPrefix = import.meta.env.VITE_ASSETS_PATH_PREFIX || ''
9
+ const assetsPathPrefix = import.meta?.env ? import.meta.env.VITE_ASSETS_PATH_PREFIX || '' : ''
10
10
 
11
11
  export const assetsPath = assetsPathPrefix + '/static/ui-assets/'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,15 @@ const getLanguage = () => {
9
9
  }
10
10
 
11
11
  export const getTranslation = (key, replace) => {
12
- let translation = translations[getLanguage()][key]
12
+ const currentLanguage = getLanguage()
13
+
14
+ let translation
15
+
16
+ if (currentLanguage in translations) {
17
+ translation = translations[currentLanguage][key]
18
+ } else {
19
+ translation = translations[DEFAULT_LANGUAGE][key]
20
+ }
13
21
 
14
22
  if (replace) {
15
23
  for (key in replace) {