Skip to content

Commit c254c0d

Browse files
committed
Code-Tab: border adjustment l + r
1 parent 756aa5f commit c254c0d

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

src/components/CodeExample.js

Lines changed: 10 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/CodeExample.res

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module Toggle = {
6464
let activeClass = if selected === i {
6565
"font-medium text-gray-90 bg-gray-5 border-t-2 border-l border-r"
6666
} else {
67-
"font-medium hover:text-gray-60 border-t-2 border-gray-20 bg-gray-10 hover:cursor-pointer"
67+
"font-medium hover:text-gray-60 border-t-2 border-l border-r bg-gray-10 hover:cursor-pointer"
6868
}
6969

7070
let onClick = evt => {
@@ -80,15 +80,15 @@ module Toggle = {
8080
| _ => ""
8181
}
8282

83-
let style = if selected === i {
84-
ReactDOM.Style.make(~borderColor="#f4646a #EDF0F2", ())->Some
83+
let borderColor = if selected === i {
84+
"#f4646a #EDF0F2"
8585
} else {
86-
None
86+
"#CDCDD6 #EDF0F2"
8787
}
88-
88+
8989
<span
9090
key
91-
?style
91+
style={ReactDOM.Style.make(~borderColor, ())}
9292
className={paddingX ++
9393
(" flex-none px-4 first:ml-6 xs:first:ml-0 inline-block p-1 rounded-tl rounded-tr " ++
9494
activeClass)}
@@ -105,10 +105,12 @@ module Toggle = {
105105
})
106106
->Belt.Option.getWithDefault(React.null)
107107

108-
<div className="relative pt-6 w-full rounded-none text-gray-80"> //text within code-box
108+
<div className="relative pt-6 w-full rounded-none text-gray-80">
109+
//text within code-box
109110
<div
110-
className="absolute flex w-full overflow-auto scrolling-touch font-sans bg-transparent text-14 text-gray-40 " style={ReactDOM.Style.make(~marginTop="-30px", ())}>
111-
<div className="flex space-x-2" > {React.array(tabElements)} </div>
111+
className="absolute flex w-full overflow-auto scrolling-touch font-sans bg-transparent text-14 text-gray-40 "
112+
style={ReactDOM.Style.make(~marginTop="-30px", ())}>
113+
<div className="flex space-x-2"> {React.array(tabElements)} </div>
112114
<div className="flex-1 border-b border-gray-10"> {React.string(j`\\u00A0`)} </div>
113115
</div>
114116
<div

0 commit comments

Comments
 (0)