mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
fix(common): use multipreview for SearchBar
This commit is contained in:
parent
ba4cd1b0c6
commit
ce62671276
1 changed files with 5 additions and 3 deletions
|
@ -30,9 +30,10 @@ import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.text.input.ImeAction
|
import androidx.compose.ui.text.input.ImeAction
|
||||||
import androidx.compose.ui.text.input.KeyboardType
|
import androidx.compose.ui.text.input.KeyboardType
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import dev.msfjarvis.claw.common.theme.LobstersTheme
|
import dev.msfjarvis.claw.common.theme.LobstersTheme
|
||||||
|
import dev.msfjarvis.claw.common.ui.preview.DevicePreviews
|
||||||
|
import dev.msfjarvis.claw.common.ui.preview.ThemePreviews
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SearchBar(
|
fun SearchBar(
|
||||||
|
@ -63,7 +64,8 @@ fun SearchBar(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Preview
|
@DevicePreviews
|
||||||
|
@ThemePreviews
|
||||||
@Composable
|
@Composable
|
||||||
fun SearchBarPreview() {
|
fun SearchBarPreview() {
|
||||||
LobstersTheme {
|
LobstersTheme {
|
||||||
|
@ -73,7 +75,7 @@ fun SearchBarPreview() {
|
||||||
value = value,
|
value = value,
|
||||||
onValueChange = { value = it },
|
onValueChange = { value = it },
|
||||||
onSearch = {},
|
onSearch = {},
|
||||||
modifier = Modifier.align(Alignment.TopCenter)
|
modifier = Modifier.align(Alignment.TopCenter).fillMaxWidth()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue