mirror of
https://github.com/bitwarden/android.git
synced 2024-11-21 08:55:48 +03:00
Remove last references to MaterialTheme (#4038)
This commit is contained in:
parent
f8592f4e17
commit
e62dc5dd21
3 changed files with 4 additions and 5 deletions
|
@ -2,7 +2,6 @@ package com.x8bit.bitwarden.ui.platform.components.appbar
|
|||
|
||||
import androidx.compose.foundation.layout.RowScope
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.MediumTopAppBar
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
|
@ -59,7 +58,7 @@ fun BitwardenMediumTopAppBar(
|
|||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
private fun BitwardenMediumTopAppBar_preview() {
|
||||
MaterialTheme {
|
||||
BitwardenTheme {
|
||||
BitwardenMediumTopAppBar(
|
||||
title = "Preview Title",
|
||||
scrollBehavior = TopAppBarDefaults
|
||||
|
|
|
@ -9,8 +9,8 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TimeInput
|
||||
|
@ -144,7 +144,7 @@ private fun TimePickerDialog(
|
|||
properties = DialogProperties(usePlatformDefaultWidth = false),
|
||||
) {
|
||||
Surface(
|
||||
shape = MaterialTheme.shapes.extraLarge,
|
||||
shape = RoundedCornerShape(28.dp),
|
||||
color = BitwardenTheme.colorScheme.background.primary,
|
||||
contentColor = BitwardenTheme.colorScheme.text.primary,
|
||||
modifier = Modifier
|
||||
|
|
|
@ -277,7 +277,7 @@ The following shows off the basic structure of a composable `...Screen` implemen
|
|||
- The VM "state" is consumed using `viewModel.stateFlow.collectAsStateWithLifecycle()`. This will cause the composable to "recompose" and update whenever updates are pushed to the `viewModel.stateFlow`.
|
||||
- The VM "events" are consumed using an [EventsEffect](../app/src/main/java/com/x8bit/bitwarden/ui/platform/base/util/EventsEffect.kt) and demonstrate how the `onNavigateToNextScreen` may be triggered.
|
||||
- The current state of the text, switch, and button are hoisted to the VM and pulled out from the `state`. User interactions with the switch and button result in "actions" being sent to the VM using `viewModel.trySendAction`.
|
||||
- Reusable components (`BitwardenLoadingDialog`, `BitwardenSwitch`, and `BitwardenFilledButton`) are used where possibe in order to build the screen using the correct theming and reduce code duplication. When this is not possible (such as when rending the `Text` composable) all colors and styles are pulled from the [MaterialTheme](https://developer.android.com/reference/kotlin/androidx/compose/material/MaterialTheme) object.
|
||||
- Reusable components (`BitwardenLoadingDialog`, `BitwardenSwitch`, and `BitwardenFilledButton`) are used where possible in order to build the screen using the correct theming and reduce code duplication. When this is not possible (such as when rending the `Text` composable) all colors and styles are pulled from the BitwardenTheme object.
|
||||
|
||||
<details>
|
||||
<summary>Show example</summary>
|
||||
|
|
Loading…
Reference in a new issue