|
|
|
@ -27,7 +27,6 @@ import androidx.compose.ui.unit.dp
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.compose.Favicon
|
|
|
|
|
import org.mozilla.fenix.theme.FirefoxTheme
|
|
|
|
|
import org.mozilla.fenix.theme.Theme
|
|
|
|
|
|
|
|
|
|
private val LIST_ITEM_HEIGHT = 56.dp
|
|
|
|
|
|
|
|
|
@ -250,7 +249,7 @@ private fun ListItem(
|
|
|
|
|
@Composable
|
|
|
|
|
@Preview(name = "TextListItem", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
|
|
|
|
private fun TextListItemPreview() {
|
|
|
|
|
FirefoxTheme(theme = Theme.getTheme()) {
|
|
|
|
|
FirefoxTheme {
|
|
|
|
|
Box(Modifier.background(FirefoxTheme.colors.layer1)) {
|
|
|
|
|
TextListItem(label = "Label only")
|
|
|
|
|
}
|
|
|
|
@ -260,7 +259,7 @@ private fun TextListItemPreview() {
|
|
|
|
|
@Composable
|
|
|
|
|
@Preview(name = "TextListItem with a description", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
|
|
|
|
private fun TextListItemWithDescriptionPreview() {
|
|
|
|
|
FirefoxTheme(theme = Theme.getTheme()) {
|
|
|
|
|
FirefoxTheme {
|
|
|
|
|
Box(Modifier.background(FirefoxTheme.colors.layer1)) {
|
|
|
|
|
TextListItem(
|
|
|
|
|
label = "Label + description",
|
|
|
|
@ -273,7 +272,7 @@ private fun TextListItemWithDescriptionPreview() {
|
|
|
|
|
@Composable
|
|
|
|
|
@Preview(name = "TextListItem with a right icon", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
|
|
|
|
private fun TextListItemWithIconPreview() {
|
|
|
|
|
FirefoxTheme(theme = Theme.getTheme()) {
|
|
|
|
|
FirefoxTheme {
|
|
|
|
|
Box(Modifier.background(FirefoxTheme.colors.layer1)) {
|
|
|
|
|
TextListItem(
|
|
|
|
|
label = "Label + right icon",
|
|
|
|
@ -288,7 +287,7 @@ private fun TextListItemWithIconPreview() {
|
|
|
|
|
@Composable
|
|
|
|
|
@Preview(name = "IconListItem", uiMode = Configuration.UI_MODE_NIGHT_YES)
|
|
|
|
|
private fun IconListItemPreview() {
|
|
|
|
|
FirefoxTheme(theme = Theme.getTheme()) {
|
|
|
|
|
FirefoxTheme {
|
|
|
|
|
Box(Modifier.background(FirefoxTheme.colors.layer1)) {
|
|
|
|
|
IconListItem(
|
|
|
|
|
label = "Left icon list item",
|
|
|
|
@ -305,7 +304,7 @@ private fun IconListItemPreview() {
|
|
|
|
|
uiMode = Configuration.UI_MODE_NIGHT_YES,
|
|
|
|
|
)
|
|
|
|
|
private fun IconListItemWithRightIconPreview() {
|
|
|
|
|
FirefoxTheme(theme = Theme.getTheme()) {
|
|
|
|
|
FirefoxTheme {
|
|
|
|
|
Box(Modifier.background(FirefoxTheme.colors.layer1)) {
|
|
|
|
|
IconListItem(
|
|
|
|
|
label = "Left icon list item + right icon",
|
|
|
|
@ -325,7 +324,7 @@ private fun IconListItemWithRightIconPreview() {
|
|
|
|
|
uiMode = Configuration.UI_MODE_NIGHT_YES,
|
|
|
|
|
)
|
|
|
|
|
private fun FaviconListItemPreview() {
|
|
|
|
|
FirefoxTheme(theme = Theme.getTheme()) {
|
|
|
|
|
FirefoxTheme {
|
|
|
|
|
Box(Modifier.background(FirefoxTheme.colors.layer1)) {
|
|
|
|
|
FaviconListItem(
|
|
|
|
|
label = "Favicon + right icon + clicks",
|
|
|
|
|