Skip to content

Commit

Permalink
Lmn 849 fix subtitle text style of bpk rating (#1821)
Browse files Browse the repository at this point in the history
* fix text style

* update screenshot in readme

* Updated snapshots for 'rtl'

* Updated snapshots for 'dm'

* Updated snapshots for 'default'

* update doc image using gradle command

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
hchen-skyscanner and github-actions[bot] authored Dec 14, 2023
1 parent 3b93914 commit 575e0f4
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,16 @@ internal fun BpkRatingTitle(
@Composable
internal fun BpkRatingSubtitle(
subtitle: String,
size: BpkRatingSize,
modifier: Modifier = Modifier,
) {
BpkText(
modifier = modifier,
text = subtitle,
style = BpkTheme.typography.bodyDefault,
style = when (size) {
BpkRatingSize.Base -> BpkTheme.typography.caption
BpkRatingSize.Large -> BpkTheme.typography.bodyDefault
},
color = BpkTheme.colors.textSecondary,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal fun BpkRatingLayout(
BpkRatingTitle(Modifier.alignByBaseline(), title)
}
if (subtitle != null) {
BpkRatingSubtitle(subtitle, Modifier.alignByBaseline())
BpkRatingSubtitle(subtitle, size, Modifier.alignByBaseline())
}
}

Expand All @@ -72,7 +72,7 @@ internal fun BpkRatingLayout(
BpkRatingTitle(content = title)
}
if (subtitle != null) {
BpkRatingSubtitle(subtitle)
BpkRatingSubtitle(subtitle, size)
}
}
}
Expand Down
Binary file modified docs/compose/Rating/screenshots/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/compose/Rating/screenshots/default_dm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 575e0f4

Please sign in to comment.