basefn 1.2.0 → 1.3.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "basefn",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/brnrdog/basefn.git"
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"@semantic-release/npm": "^13.1.3",
|
|
82
82
|
"rescript": "^12.0.1",
|
|
83
83
|
"vite": "^5.0.0",
|
|
84
|
-
"xote": "^4.
|
|
84
|
+
"xote": "^4.11.0"
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -28,19 +28,7 @@ let make = (
|
|
|
28
28
|
~onMenuClick: option<unit => unit>=?,
|
|
29
29
|
~size: size=Md,
|
|
30
30
|
) => {
|
|
31
|
-
let
|
|
32
|
-
let class = Computed.make(() => {
|
|
33
|
-
let sizeClass = " basefn-topbar--" ++ sizeToString(size)
|
|
34
|
-
let scrollingClass = Signal.get(scrolling) ? " basefn-topbar--scrolling" : ""
|
|
35
|
-
"basefn-topbar" ++ sizeClass ++ scrollingClass
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
let _ = Effect.run(() => {
|
|
39
|
-
Basefn__Dom.addEventListener("scroll", () => {
|
|
40
|
-
let scrollY = %raw("window.scrollY")
|
|
41
|
-
Signal.set(scrolling, scrollY >= 64)
|
|
42
|
-
})
|
|
43
|
-
})
|
|
31
|
+
let class = "basefn-topbar basefn-topbar--" ++ sizeToString(size)
|
|
44
32
|
|
|
45
33
|
<header class>
|
|
46
34
|
<div class="basefn-topbar__left">
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Xote from "xote/src/Xote.res.mjs";
|
|
4
4
|
import * as Xote__JSX from "xote/src/Xote__JSX.res.mjs";
|
|
5
|
-
import * as Basefn__Dom from "../Basefn__Dom.res.mjs";
|
|
6
5
|
|
|
7
6
|
import './Basefn__Topbar.css'
|
|
8
7
|
;
|
|
@@ -27,16 +26,7 @@ function Basefn__Topbar(props) {
|
|
|
27
26
|
let navItems = props.navItems;
|
|
28
27
|
let logo = props.logo;
|
|
29
28
|
let size = __size !== undefined ? __size : "Md";
|
|
30
|
-
let
|
|
31
|
-
let $$class = Xote.Computed.make(() => {
|
|
32
|
-
let sizeClass = " basefn-topbar--" + sizeToString(size);
|
|
33
|
-
let scrollingClass = Xote.Signal.get(scrolling) ? " basefn-topbar--scrolling" : "";
|
|
34
|
-
return "basefn-topbar" + sizeClass + scrollingClass;
|
|
35
|
-
}, undefined);
|
|
36
|
-
Xote.Effect.run(() => Basefn__Dom.addEventListener("scroll", () => {
|
|
37
|
-
let scrollY = window.scrollY;
|
|
38
|
-
Xote.Signal.set(scrolling, scrollY >= 64);
|
|
39
|
-
}), undefined);
|
|
29
|
+
let $$class = "basefn-topbar basefn-topbar--" + sizeToString(size);
|
|
40
30
|
return Xote__JSX.Elements.jsxs("header", {
|
|
41
31
|
class: $$class,
|
|
42
32
|
children: Xote__JSX.array([
|