@bexis2/bexis2-core-ui 0.4.85 → 0.4.86
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 +7 -0
- package/dist/components/form/InputContainer.svelte +1 -1
- package/dist/components/form/InputContainer.svelte.d.ts +1 -0
- package/dist/components/page/menu/Menu.svelte +6 -0
- package/package.json +1 -1
- package/src/lib/components/form/InputContainer.svelte +1 -2
- package/src/lib/components/page/menu/Menu.svelte +8 -1
package/README.md
CHANGED
|
@@ -12,16 +12,22 @@ onMount(async () => {
|
|
|
12
12
|
let m = await getMenuItems();
|
|
13
13
|
menuStore.set(m);
|
|
14
14
|
console.log("\u{1F680} ~ onMount ~ menuStore:", $menuStore);
|
|
15
|
+
const storedFontSize = localStorage.getItem("fontSize");
|
|
16
|
+
if (storedFontSize) {
|
|
17
|
+
document.documentElement.style.fontSize = storedFontSize;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
let hamburger = true;
|
|
17
21
|
const theme = writable("light");
|
|
18
22
|
function increaseFontSize() {
|
|
19
23
|
const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
20
24
|
document.documentElement.style.fontSize = currentFontSize + 1 + "px";
|
|
25
|
+
localStorage.setItem("fontSize", document.documentElement.style.fontSize);
|
|
21
26
|
}
|
|
22
27
|
function decreaseFontSize() {
|
|
23
28
|
const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
24
29
|
document.documentElement.style.fontSize = currentFontSize - 1 + "px";
|
|
30
|
+
localStorage.setItem("fontSize", document.documentElement.style.fontSize);
|
|
25
31
|
}
|
|
26
32
|
function toggleDarkMode() {
|
|
27
33
|
if ($theme === "dark") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bexis2/bexis2-core-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.86",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).",
|
|
6
6
|
"keywords": [
|
|
@@ -16,20 +16,27 @@
|
|
|
16
16
|
menuStore.set(m);
|
|
17
17
|
|
|
18
18
|
console.log('🚀 ~ onMount ~ menuStore:', $menuStore);
|
|
19
|
+
// set the font size to the value stored in local storage
|
|
20
|
+
const storedFontSize = localStorage.getItem('fontSize');
|
|
21
|
+
if (storedFontSize) {
|
|
22
|
+
document.documentElement.style.fontSize = storedFontSize;
|
|
23
|
+
}
|
|
19
24
|
});
|
|
20
25
|
|
|
21
26
|
let hamburger = true;
|
|
22
27
|
const theme = writable('light');
|
|
23
28
|
|
|
24
|
-
// function to increase the current font size by 1 step
|
|
29
|
+
// function to increase the current font size by 1 step; set in local storage so it is remembered on page reload
|
|
25
30
|
function increaseFontSize() {
|
|
26
31
|
const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
27
32
|
document.documentElement.style.fontSize = currentFontSize + 1 + 'px';
|
|
33
|
+
localStorage.setItem('fontSize', document.documentElement.style.fontSize);
|
|
28
34
|
}
|
|
29
35
|
// function to decrease the current font size by 1 step
|
|
30
36
|
function decreaseFontSize() {
|
|
31
37
|
const currentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
32
38
|
document.documentElement.style.fontSize = currentFontSize - 1 + 'px';
|
|
39
|
+
localStorage.setItem('fontSize', document.documentElement.style.fontSize);
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
// function to toggle dark mode
|