diff options
author | Joris | 2017-02-08 10:18:23 +0100 |
---|---|---|
committer | Joris | 2017-02-08 10:18:23 +0100 |
commit | 52fc052d859d442ed734470f305bd4891f16575c (patch) | |
tree | 8948faa9dcf5b4c764d6a733cb42af2ff535ed8f /src/main/scala/reading/component/widget/Popup.scala | |
parent | c4bfd903d6dcff20d521d7c11b7895383e632c02 (diff) | |
download | reading-52fc052d859d442ed734470f305bd4891f16575c.tar.gz reading-52fc052d859d442ed734470f305bd4891f16575c.tar.bz2 reading-52fc052d859d442ed734470f305bd4891f16575c.zip |
Simplify CSS page style
Diffstat (limited to 'src/main/scala/reading/component/widget/Popup.scala')
-rw-r--r-- | src/main/scala/reading/component/widget/Popup.scala | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/main/scala/reading/component/widget/Popup.scala b/src/main/scala/reading/component/widget/Popup.scala deleted file mode 100644 index 86b47bf..0000000 --- a/src/main/scala/reading/component/widget/Popup.scala +++ /dev/null @@ -1,44 +0,0 @@ -package reading.component.widget - -import org.scalajs.dom - -import rx._ -import Ctx.Owner.Unsafe._ - -import scalatags.JsDom.all._ -import scalacss.Defaults._ -import scalacss.ScalatagsCss._ - -import reading.component.widget.style.{ Popup => PopupStyle } -import reading.utils.{ RxAttr } - -object Popup { - def apply(onClose: => Unit)(content: HtmlTag): HtmlTag = { - dom.document.body.style.overflowY = "hidden" - - div( - PopupStyle.render, - PopupStyle.popup, - - div( - PopupStyle.curtain, - RxAttr(onclick, Rx(() => close(onClose))) - ), - - div( - PopupStyle.content, - content, - button( - PopupStyle.close, - RxAttr(onclick, Rx(() => close(onClose))), - "Fermer" - ) - ) - ) - } - - private def close(onClose: => Unit): Unit = { - dom.document.body.style.overflowY = "scroll" - onClose - } -} |