mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
For #25750 - Use Headline7 for the expandable list headers that appear in cards
This commit is contained in:
parent
2f17888f79
commit
8fa08f31b9
@ -20,6 +20,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.mozilla.fenix.R
|
||||
@ -30,6 +31,7 @@ import org.mozilla.fenix.theme.Theme
|
||||
* Expandable header for sections of lists
|
||||
*
|
||||
* @param headerText The title of the header.
|
||||
* @param headerTextStyle The text style of the header.
|
||||
* @param expanded Indicates whether the section of content is expanded. If null, the Icon will be hidden.
|
||||
* @param expandActionContentDescription The content description for expanding the section.
|
||||
* @param collapseActionContentDescription The content description for collapsing the section.
|
||||
@ -40,6 +42,7 @@ import org.mozilla.fenix.theme.Theme
|
||||
@Composable
|
||||
fun ExpandableListHeader(
|
||||
headerText: String,
|
||||
headerTextStyle: TextStyle = FirefoxTheme.typography.headline8,
|
||||
expanded: Boolean? = null,
|
||||
expandActionContentDescription: String? = null,
|
||||
collapseActionContentDescription: String? = null,
|
||||
@ -64,7 +67,7 @@ fun ExpandableListHeader(
|
||||
Text(
|
||||
text = headerText,
|
||||
color = FirefoxTheme.colors.textPrimary,
|
||||
style = FirefoxTheme.typography.headline8,
|
||||
style = headerTextStyle,
|
||||
maxLines = 1,
|
||||
)
|
||||
|
||||
|
@ -105,6 +105,7 @@ fun Collection(
|
||||
|
||||
ExpandableListHeader(
|
||||
headerText = collection.title,
|
||||
headerTextStyle = FirefoxTheme.typography.headline7,
|
||||
expanded = isExpanded,
|
||||
) {
|
||||
if (isExpanded) {
|
||||
|
@ -138,6 +138,7 @@ private fun InactiveTabsHeader(
|
||||
) {
|
||||
ExpandableListHeader(
|
||||
headerText = stringResource(R.string.inactive_tabs_title),
|
||||
headerTextStyle = FirefoxTheme.typography.headline7,
|
||||
expanded = expanded,
|
||||
expandActionContentDescription = stringResource(R.string.inactive_tabs_expand_content_description),
|
||||
collapseActionContentDescription = stringResource(R.string.inactive_tabs_collapse_content_description),
|
||||
|
Loading…
Reference in New Issue
Block a user