summaryrefslogtreecommitdiff
path: root/sw-ui
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-22 15:15:27 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-22 15:31:45 +0200
commitd7506498760908fb9d918f4ece923dc95b50e739 (patch)
treea1b85d26cdc644709b02757c73804b684b5fec23 /sw-ui
parentAdd callout component (diff)
downloadseven-wonders-d7506498760908fb9d918f4ece923dc95b50e739.tar.gz
seven-wonders-d7506498760908fb9d918f4ece923dc95b50e739.tar.bz2
seven-wonders-d7506498760908fb9d918f4ece923dc95b50e739.zip
Use callout component for action text (info bubble)
Diffstat (limited to 'sw-ui')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt
index 28ebbe74..db9c1e4c 100644
--- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt
+++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/GameScene.kt
@@ -93,8 +93,14 @@ private class GameScene(props: GameSceneProps) : RComponent<GameSceneProps, RSta
private fun RBuilder.turnInfoScene(turnInfo: PlayerTurnInfo) {
val board = turnInfo.table.boards[turnInfo.playerIndex]
div {
- // TODO use blueprint's Callout component without header and primary intent
- p { +turnInfo.message }
+ styledDiv {
+ css {
+ classes.add("bp3-dark")
+ display = Display.inlineBlock // so that the cards below don't overlap, but the width is not full
+ margin(all = 0.4.rem)
+ }
+ bpCallout(intent = Intent.PRIMARY, icon = "info-sign") { +turnInfo.message }
+ }
boardComponent(board = board)
val hand = turnInfo.hand
if (hand != null) {
bgstack15