This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* version 3.2 | |
* | |
* table class is renamed as csstable because it conflicts with scalatags | |
*/ | |
object BootstrapCSS { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by chandrasekharkode . | |
*/ | |
object ReactSearchBox { | |
trait Style { | |
def searchBox : TagMod = Seq( position := "relative" , | |
marginBottom := "10px") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by chandrasekharkode | |
* | |
* Eventually these should be copied to scalajs-react core | |
*/ | |
trait RCustomTags { | |
/* styles */ | |
val webkitTransform = "webkitTransform".reactStyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object DefaultSelect { | |
class Backend(t: BackendScope[Props, _]) { | |
def onChange(e:ReactEventI) = t.props.onChange(e.target.value) | |
} | |
val component = ReactComponentB[Props]("DefaultSelect") | |
.stateless | |
.backend(new Backend(_)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.scalajs.js | |
import scala.scalajs.js.Dynamic.{literal => json} | |
import scala.scalajs.js.annotation.JSName | |
/** | |
* Created by chandrasekharkode . | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CssPager { | |
type CLICKEVENT = Int => Unit | |
object Style extends StyleSheet.Inline { | |
import dsl._ | |
val pager = style(margin(20.px), | |
unsafeChild(".previous")(float.left), | |
unsafeChild(".next")(float.right) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object ReactListView { | |
class Style extends StyleSheet.Inline { | |
import dsl._ | |
val listGroup = style(marginBottom(20.px), | |
paddingLeft.`0`, | |
&.firstChild.lastChild(borderBottomLeftRadius(4 px), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//style attr ( flex,padding,..) | |
case class NativeStyle[T](name : String) { | |
def := (v :T) = new NativeStylePair[T](name,v) | |
} | |
// style attr and value pair (flex = 1 , alignItems = center) | |
case class NativeStylePair[T](key : String ,value : T) | |
// define supported css attrs with corresponding type | |
trait NativeAttrs { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait CommonValueClass extends Any | |
class Type1 private(val name : String) extends CommonValueClass | |
object Type1 { | |
val SCALA = new Type1("scala") | |
} | |
class Type2 private(val option : String) extends CommonValueClass |
OlderNewer