@colisweb/rescript-toolkit 5.1.1 → 5.2.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": "@colisweb/rescript-toolkit",
3
- "version": "5.1.1",
3
+ "version": "5.2.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -1,3 +1,4 @@
1
+ module AutoPrintPage = Toolkit__Ui_AutoPrintPage
1
2
  module Button = Toolkit__Ui_Button
2
3
  module ButtonGroup = Toolkit__Ui_ButtonGroup
3
4
  module ButtonGroup2 = Toolkit__Ui_ButtonGroup2
@@ -0,0 +1,12 @@
1
+ @val
2
+ external print: unit => unit = "window.print"
3
+
4
+ @react.component
5
+ let make = () => {
6
+ React.useEffect(() => {
7
+ print()
8
+ None
9
+ }, [])
10
+
11
+ React.null
12
+ }
@@ -10,7 +10,7 @@ module Footer = {
10
10
  <footer
11
11
  className={cx([
12
12
  className,
13
- "flex-none text-gray-600 text-center text-lg pt-4",
13
+ "flex-none text-gray-600 text-center text-lg pt-4 print:hidden",
14
14
  hasSidebar ? "lg:ml-20" : "",
15
15
  ])}>
16
16
  {switch children {
@@ -39,7 +39,7 @@ let make = (
39
39
  textareaRef.current->Js.Nullable.toOption->Option.forEach(autoExpand)
40
40
  }
41
41
 
42
- React.useEffect1(() => {
42
+ React.useEffect(() => {
43
43
  textareaRef.current->Js.Nullable.toOption->Option.forEach(autoExpand)
44
44
  None
45
45
  }, [textareaRef.current])