Skip to content

Commit

Permalink
Move stuff around to test arrangement.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Lasa committed Mar 4, 2024
1 parent 00df63c commit df29384
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions composeApp/src/commonMain/kotlin/ui/dashboard/Dashboard.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package ui.dashboard

import QButton
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
Expand Down Expand Up @@ -46,12 +49,23 @@ fun Dashboard(viewModel: DashboardViewModel) {
}
}
Box(modifier = Modifier.fillMaxHeight().weight(1f).background(Color.Red)) {
// when(selectedElement) {
// UiElement.BUTTON -> QButtonScreen()
// null -> {
//
// }
// }
when (selectedElement) {
UiElement.BUTTON -> {
QButton(
text = "QButton",
onClick = { },
colors = ButtonDefaults.buttonColors(
containerColor = Color(0xff6200EE) //colorResource(id = R.color.purple_500)
),
shape = RoundedCornerShape(16.dp, 1.dp, 16.dp, 1.dp)
)
}

null -> {

}
}
}
Column(modifier = Modifier.fillMaxHeight().width(200.dp)) { }
}
}

0 comments on commit df29384

Please sign in to comment.