fix balance card color
This commit is contained in:
parent
1d24005e5e
commit
38ce999965
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
|
|||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextFieldDefaults
|
||||
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
||||
import androidx.compose.runtime.Composable
|
||||
|
@ -157,12 +158,12 @@ fun DashboardScreen(dashboardViewModel: DashboardViewModel) {
|
|||
|
||||
@Composable
|
||||
fun balanceCardColor(balance: Double): Color {
|
||||
return if (balance > 0) CardDefaults.cardColors().containerColor else MaterialTheme.colorScheme.errorContainer
|
||||
return if (balance > 0) Color.Unspecified else MaterialTheme.colorScheme.errorContainer
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun balanceColor(balance: Double, warningThreshold: Double): Color {
|
||||
return if (balance > warningThreshold) MaterialTheme.colorScheme.secondary else MaterialTheme.colorScheme.error
|
||||
return if (balance > warningThreshold) Color.Unspecified else MaterialTheme.colorScheme.error
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
|
Loading…
Reference in a new issue