File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/main/scala/sri/universal/apis Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package sri.universal.apis
3
3
import scala .scalajs .js
4
4
import scala .scalajs .js .Dynamic .{literal => json }
5
5
import scala .scalajs .js .annotation .JSImport
6
+ import sri .macros .{FunctionObjectMacro , OptDefault => NoValue , OptionalParam => OP }
6
7
7
8
@ js.native
8
9
trait Alert extends js.Object {
@@ -18,9 +19,19 @@ trait Alert extends js.Object {
18
19
object Alert extends Alert
19
20
20
21
trait AlertButton extends js.Object {
21
- var text : js.UndefOr [String ] = js.undefined
22
- var onPress : js.UndefOr [js.Function ] = js.undefined
23
- var style : js.UndefOr [AlertButtonStyle ] = js.undefined
22
+ val text : js.UndefOr [String ] = js.undefined
23
+ val onPress : js.UndefOr [js.Function ] = js.undefined
24
+ val style : js.UndefOr [AlertButtonStyle ] = js.undefined
25
+ }
26
+
27
+ object AlertButton {
28
+ @ inline
29
+ def apply (text : OP [String ] = NoValue ,
30
+ onPress : OP [() => _] = NoValue ,
31
+ style : OP [AlertButtonStyle ] = NoValue ): AlertButton = {
32
+ val p = FunctionObjectMacro ()
33
+ p.asInstanceOf [AlertButton ]
34
+ }
24
35
}
25
36
26
37
trait AlertOptions extends js.Object {
You can’t perform that action at this time.
0 commit comments