Skip to content

Commit

Permalink
UI Improvements 2022-03-11 (#75)
Browse files Browse the repository at this point in the history
* Move FHIR version to own section

* Add more hints to the selected IGs

* Update RELEASE_NOTES.md

* Revert IgDisplay border color to gray.

* Clean up older style name and unused border color

Co-authored-by: dotasek <[email protected]>
  • Loading branch information
dotasek and dotasek committed Mar 14, 2022
1 parent 43ef6c5 commit bb7ad08
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/jsMain/kotlin/ui/components/options/IgDisplay.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class IgDisplay : RComponent<IgDisplayProps, RState>() {
override fun RBuilder.render() {
styledDiv {
css {
+IgUrlDisplayStyle.mainDiv
+IgDisplayStyle.mainDiv
if (!props.packageInfo.fhirVersionMatches(props.fhirVersion)) {
background = "repeating-linear-gradient(\n" +
" 45deg,\n" +
Expand All @@ -30,7 +30,6 @@ class IgDisplay : RComponent<IgDisplayProps, RState>() {
" ${FATAL_PINK.changeAlpha(0.2)} 20px\n" +
");"
}
borderColor = HL7_RED
}
if (!props.packageInfo.fhirVersionMatches(props.fhirVersion)) {
attrs {
Expand All @@ -40,13 +39,13 @@ class IgDisplay : RComponent<IgDisplayProps, RState>() {
styledSpan {
css {
+TextStyle.dropDownLabel
+IgUrlDisplayStyle.igName
+IgDisplayStyle.igName
}
+PackageInfo.igLookupString(props.packageInfo)
}
styledImg {
css {
+IgUrlDisplayStyle.closeButton
+IgDisplayStyle.closeButton
}
attrs {
src = "images/close_black.png"
Expand All @@ -71,11 +70,11 @@ fun RBuilder.igDisplay(handler: IgDisplayProps.() -> Unit): ReactElement {
/**
* CSS
*/
object IgUrlDisplayStyle : StyleSheet("IgUrlDisplayStyle", isStatic = true) {
object IgDisplayStyle : StyleSheet("IgDisplayStyle", isStatic = true) {
val mainDiv by css {
display = Display.flex
flexDirection = FlexDirection.row
border(width = 1.px, style = BorderStyle.solid, color = HL7_RED)
border(width = 1.px, style = BorderStyle.solid, color = BORDER_GRAY)
margin(right = 16.px, top = 4.px, bottom = 4.px)
padding(horizontal = 16.px, vertical = 8.px)
backgroundColor = WHITE
Expand Down

0 comments on commit bb7ad08

Please sign in to comment.