diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-22 20:44:51 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-22 20:44:51 +0100 |
commit | 0cdf3cc5a3f7861e577545fb348d269de4b59bd3 (patch) | |
tree | c21e381ef381ac2a707f2fdcf92e1a9f395d93c7 /sw-ui-kt | |
parent | Remove unnecessary semi-colon (diff) | |
download | seven-wonders-0cdf3cc5a3f7861e577545fb348d269de4b59bd3.tar.gz seven-wonders-0cdf3cc5a3f7861e577545fb348d269de4b59bd3.tar.bz2 seven-wonders-0cdf3cc5a3f7861e577545fb348d269de4b59bd3.zip |
FIx lobby items alignment
Diffstat (limited to 'sw-ui-kt')
-rw-r--r-- | sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt index 78f7fbed..d243d901 100644 --- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt @@ -4,8 +4,10 @@ import com.palantir.blueprintjs.IconName import com.palantir.blueprintjs.Intent import com.palantir.blueprintjs.icon import kotlinx.css.Align +import kotlinx.css.Display import kotlinx.css.FlexDirection -import kotlinx.css.alignContent +import kotlinx.css.alignItems +import kotlinx.css.display import kotlinx.css.flexDirection import kotlinx.css.margin import kotlinx.css.opacity @@ -67,8 +69,9 @@ private fun PlayerDTO?.elementBuilder(): ElementBuilder { private fun RBuilder.playerItem(player: PlayerDTO): ReactElement = styledDiv { css { + display = Display.flex flexDirection = FlexDirection.column - alignContent = Align.center + alignItems = Align.center } val title = if (player.isGameOwner) "Game owner" else null userIcon(isUser = player.isUser, isOwner = player.isGameOwner, title = title) @@ -82,8 +85,9 @@ private fun RBuilder.playerItem(player: PlayerDTO): ReactElement = styledDiv { private fun RBuilder.playerPlaceholder(): ReactElement = styledDiv { css { + display = Display.flex flexDirection = FlexDirection.column - alignContent = Align.center + alignItems = Align.center opacity = 0.3 } userIcon(isUser = false, isOwner = false, title = "Waiting for player...") |