Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from reason-association/design-update
Design update
- Loading branch information
Showing
19 changed files
with
434 additions
and
305 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[@react.component] | ||
let make = (~children) => { | ||
<div className="-ml-8 my-10"> children </div>; | ||
<div className="my-10"> children </div>; | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
open Util.ReactStuff; | ||
|
||
type lang = [ | `Reason | `OCaml]; | ||
|
||
[@react.component] | ||
let make = (~children, ~lang=`Reason) => { | ||
let langStr = | ||
switch (lang) { | ||
| `Reason => "RE" | ||
| `OCaml => "ML" | ||
}; | ||
<div className="flex flex-col rounded-lg bg-sand-lighten-20 py-4 px-6 mt-6"> | ||
let make = (~code: string, ~lang) => { | ||
let highlighted = HighlightJs.(highlight(~lang, ~value=code)->valueGet); | ||
|
||
let children = | ||
ReactDOMRe.createElementVariadic( | ||
"code", | ||
~props= | ||
ReactDOMRe.objToDOMProps({ | ||
"className": "hljs lang-" ++ lang, | ||
"dangerouslySetInnerHTML": { | ||
"__html": highlighted, | ||
}, | ||
}), | ||
[||], | ||
); | ||
|
||
<div | ||
className="flex flex-col rounded-lg bg-main-black py-3 px-3 mt-10 overflow-x-auto text-lighter-grey"> | ||
<div | ||
className="flex justify-between font-overpass text-main-lighten-20 font-bold text-sm mb-3"> | ||
"Example"->s | ||
<span className="font-montserrat text-primary-lighten-50"> | ||
langStr->s | ||
</span> | ||
className="font-montserrat text-sm mb-3 font-bold text-primary-dark-10"> | ||
{Js.String2.toUpperCase(lang)->s} | ||
</div> | ||
children | ||
<div className="pl-5 text-base pb-4"> children </div> | ||
</div>; | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
open Util.ReactStuff; | ||
|
||
[@react.component] | ||
let make = () => { | ||
<div />; | ||
let make = (~code, ~lang) => { | ||
let highlighted = HighlightJs.(highlight(~lang, ~value=code)->valueGet); | ||
|
||
ReactDOMRe.createElementVariadic( | ||
"code", | ||
~props= | ||
ReactDOMRe.objToDOMProps({ | ||
"className": "font-bold hljs lang-" ++ lang, | ||
"dangerouslySetInnerHTML": { | ||
"__html": highlighted, | ||
}, | ||
}), | ||
[||], | ||
); | ||
}; |
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
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
Oops, something went wrong.