Skip to content
This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Commit 9059916

Browse files
authored
Merge pull request #71 from cquiroz/toast
Add facade for react-semantic-toasts
2 parents 86fdd1a + 12e4ac0 commit 9059916

File tree

8 files changed

+367
-2093
lines changed

8 files changed

+367
-2093
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 0.2.1
44

55
* Upgrade to react-semantic-ui 0.87.3
6+
* Support react-semantic-toasts
67
* Added Rail component
78

89
## 0.2.0

build.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ val reactJS = "16.7.0"
22
val scalaJsReact = "1.4.2"
33
val SUI = "2.4.1"
44
val reactSUI = "0.87.3"
5+
val Toasts = "0.6.5"
56

67
parallelExecution in (ThisBuild, Test) := false
78

@@ -98,7 +99,8 @@ lazy val demo =
9899
npmDependencies in Compile ++= Seq(
99100
"react" -> reactJS,
100101
"react-dom" -> reactJS,
101-
"semantic-ui-less" -> SUI
102+
"semantic-ui-less" -> SUI,
103+
"react-semantic-toasts" -> Toasts
102104
),
103105
// don't publish the demo
104106
publish := {},
@@ -126,6 +128,7 @@ lazy val facade =
126128
"react" -> reactJS,
127129
"react-dom" -> reactJS,
128130
"semantic-ui-react" -> reactSUI,
131+
"react-semantic-toasts" -> Toasts,
129132
"create-react-context" -> "0.2.2"
130133
),
131134
libraryDependencies ++= Seq(

demo/src/main/resources/dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import "./theme/semantic.less";
22
import "./less/style.less";
3+
import "react-semantic-toasts/styles/react-semantic-alert.css";
34

45
import App from "sjs/demo-fastopt.js";
56
import React from "react";

demo/src/main/scala/react/semanticui/demo/HomeComponent.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package react.semanticui.demo
22

33
import japgolly.scalajs.react._
44
import japgolly.scalajs.react.vdom.html_<^._
5+
import react.semanticui.toasts._
6+
import react.semanticui.elements.button.Button
57

68
object HomeComponent {
79
private val component =
@@ -31,7 +33,11 @@ object HomeComponent {
3133
"Semantic React UI"
3234
)
3335
)
34-
)
36+
),
37+
Button(onClick = toastCB(ToastOptions("Greetings"), onClose = Callback.log("here")))(
38+
"Toast"
39+
),
40+
SemanticToastContainer()
3541
)
3642
}
3743
.build

0 commit comments

Comments
 (0)