Skip to content

Commit

Permalink
HMA-9567 - Navigation arrows for dark mode in compose (#203)
Browse files Browse the repository at this point in the history
* HMA-9567 - Navigation arrows for dark mode in compose
  • Loading branch information
rajesh-1394 authored Jan 21, 2025
1 parent 22c7216 commit 776c2fd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components-compose/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ Allowed headings:

### Changed

* Updated the component with dark mode navigation icon for `SummaryRowView`

## [0.1.7] - 2025-01-10Z

### Changed

* Updated the component with link text style for `SummaryRowView`

## [0.1.6] - 2024-11-18Z
Expand Down Expand Up @@ -105,7 +111,7 @@ feature/HMA-5091-Android-Jetpack-Compose-Components-SummaryRowView
### Changed

* Changed how SelectRowGroup works. It now takes a list of `SelectRowViewItem` to populate the rows, and requires a
selected item rather than relying on position.
selected item rather than relying on position.

## [0.0.4] - 2024-04-12Z

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package uk.gov.hmrc.components.compose.organism.summaryrow

import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -31,6 +32,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.semantics.Role
Expand All @@ -39,6 +41,8 @@ import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextOverflow
import uk.gov.hmrc.components.compose.R
import uk.gov.hmrc.components.compose.ui.theme.HmrcBlack
import uk.gov.hmrc.components.compose.ui.theme.HmrcBlackDark
import uk.gov.hmrc.components.compose.ui.theme.HmrcRippleTheme
import uk.gov.hmrc.components.compose.ui.theme.HmrcTheme.dimensions
import uk.gov.hmrc.components.compose.ui.theme.HmrcTheme.typography
Expand Down Expand Up @@ -80,6 +84,13 @@ fun SummaryRowView(
Spacer(modifier = Modifier.width(dimensions.hmrcSpacing8))
Image(
painter = icon,
colorFilter = ColorFilter.tint(
if (isSystemInDarkTheme()) {
HmrcBlackDark
} else {
HmrcBlack
}
),
modifier = Modifier
.semantics { role = Role.Button }
.clickable { onSummaryRowClicked() },
Expand Down

0 comments on commit 776c2fd

Please sign in to comment.