Remove ElementColors. We should use semantics and material colors now.
This commit is contained in:
parent
bcb64f7d44
commit
e2f3f2966b
9 changed files with 29 additions and 146 deletions
|
|
@ -59,7 +59,7 @@ fun RoundedIconAtom(
|
|||
modifier = modifier
|
||||
.size(size.toContainerSize())
|
||||
.background(
|
||||
color = ElementTheme.legacyColors.quinary,
|
||||
color = ElementTheme.materialColors.surfaceVariant,
|
||||
shape = RoundedCornerShape(size.toCornerSize())
|
||||
)
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -156,10 +156,10 @@ object ElementSearchBarDefaults {
|
|||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun inactiveColors() = SearchBarDefaults.colors(
|
||||
containerColor = ElementTheme.legacyColors.gray300,
|
||||
containerColor = ElementTheme.materialColors.surfaceVariant,
|
||||
inputFieldColors = TextFieldDefaults.colors(
|
||||
unfocusedPlaceholderColor = ElementTheme.legacyColors.placeholder,
|
||||
focusedPlaceholderColor = ElementTheme.legacyColors.placeholder,
|
||||
unfocusedPlaceholderColor = ElementTheme.colors.textDisabled,
|
||||
focusedPlaceholderColor = ElementTheme.colors.textDisabled,
|
||||
unfocusedLeadingIconColor = MaterialTheme.colorScheme.primary,
|
||||
focusedLeadingIconColor = MaterialTheme.colorScheme.primary,
|
||||
unfocusedTrailingIconColor = MaterialTheme.colorScheme.primary,
|
||||
|
|
@ -172,8 +172,8 @@ object ElementSearchBarDefaults {
|
|||
fun activeColors() = SearchBarDefaults.colors(
|
||||
containerColor = Color.Transparent,
|
||||
inputFieldColors = TextFieldDefaults.colors(
|
||||
unfocusedPlaceholderColor = ElementTheme.legacyColors.placeholder,
|
||||
focusedPlaceholderColor = ElementTheme.legacyColors.placeholder,
|
||||
unfocusedPlaceholderColor = ElementTheme.colors.textDisabled,
|
||||
focusedPlaceholderColor = ElementTheme.colors.textDisabled,
|
||||
unfocusedLeadingIconColor = MaterialTheme.colorScheme.primary,
|
||||
focusedLeadingIconColor = MaterialTheme.colorScheme.primary,
|
||||
unfocusedTrailingIconColor = MaterialTheme.colorScheme.primary,
|
||||
|
|
@ -243,19 +243,28 @@ internal fun SearchBarPreviewActiveWithContent() = ElementThemedPreview {
|
|||
active = true,
|
||||
resultState = SearchBarResultState.Results("result!"),
|
||||
contentPrefix = {
|
||||
Text(text = "Content that goes before the search results", modifier = Modifier
|
||||
.background(color = Color.Red)
|
||||
.fillMaxWidth())
|
||||
Text(
|
||||
text = "Content that goes before the search results",
|
||||
modifier = Modifier
|
||||
.background(color = Color.Red)
|
||||
.fillMaxWidth()
|
||||
)
|
||||
},
|
||||
contentSuffix = {
|
||||
Text(text = "Content that goes after the search results", modifier = Modifier
|
||||
.background(color = Color.Blue)
|
||||
.fillMaxWidth())
|
||||
Text(
|
||||
text = "Content that goes after the search results",
|
||||
modifier = Modifier
|
||||
.background(color = Color.Blue)
|
||||
.fillMaxWidth()
|
||||
)
|
||||
},
|
||||
resultHandler = {
|
||||
Text(text = "Results go here", modifier = Modifier
|
||||
.background(color = Color.Green)
|
||||
.fillMaxWidth())
|
||||
Text(
|
||||
text = "Results go here",
|
||||
modifier = Modifier
|
||||
.background(color = Color.Green)
|
||||
.fillMaxWidth()
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue