Created
December 10, 2017 13:39
-
-
Save wojciech-bilicki/56c12c52ff6d19ba8939aff1a0403247 to your computer and use it in GitHub Desktop.
TopBar styled
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
[@bs.module] external logo : string = "./assets/Marvel-Logo.png"; | |
let component = ReasonReact.statelessComponent("YoDawgTopBar"); | |
let str = ReasonReact.stringToElement; | |
let style = | |
Css.( | |
{ | |
"header": | |
style([ | |
backgroundColor(rgba(238, 35, 45, 1.0)), | |
display(Flex), | |
justifyContent(SpaceBetween), | |
alignItems(Center) | |
]), | |
"title": style([color(white), fontSize(px(36)), fontWeight(Bold)]), | |
"logo": style([width(px(200)), height(px(80)), marginLeft(px(32)) ]), | |
"search_input_wrapper":style([marginRight(px(32))]), | |
"search_input": style([marginRight(px(8))]) | |
} | |
); | |
let make = (_children) => { | |
...component, | |
render: (_self) => | |
<header className=style##header> | |
<a href="#"> | |
<img className=style##logo src={logo} /> | |
</a> | |
<span className=style##title> (str("Super Marvel Heroes")) </span> | |
<div className=style##search_input_wrapper> | |
<input className=style##search_input placeholder="search" /> | |
<button> (str("Search")) </button> | |
</div> | |
</header> | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code needs some updates as of today (16th April, 2018):