Skip to content

feat(inline-text-list-item): add strikethroughColor for the struck value#1091

Merged
FabioRolin merged 2 commits into
masterfrom
feat/inline-text-list-strikethrough-color
Jun 3, 2026
Merged

feat(inline-text-list-item): add strikethroughColor for the struck value#1091
FabioRolin merged 2 commits into
masterfrom
feat/inline-text-list-strikethrough-color

Conversation

@FabioRolin

@FabioRolin FabioRolin commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Contexto

No OceanInlineTextListItem, quando o item tem newValue, o value é renderizado riscado e a sua cor estava hardcoded em interfaceDarkDown — o prop público color é usado para o conteúdo ativo (ícone, value sem newValue e o próprio newValue), mas não para o value riscado.

Um app consumidor (PagBlu / blu-mobile-android) precisa que o value riscado use colorInterfaceDarkUp (alinhado a Web/iOS), o que hoje não é possível via API.

Recorder

Screen_recording_20260603_162341.webm

Mudança

  • Novo campo opcional strikethroughColor: String? em OceanInlineTextList (token Ocean, ex.: "colorInterfaceDarkUp").
  • OceanInlineTextListItem passa a usar strikethroughColor na cor do value riscado; quando nulo, mantém interfaceDarkDown.
  • 100% backward-compatible: sem strikethroughColor, o comportamento é idêntico ao atual.
  • Preview atualizado com um sample do novo prop.

Uso

OceanInlineTextList(
    label = "Juros nas 2 primeiras parcelas",
    value = "4,39%",
    newValue = "Grátis",
    color = "colorStatusPositiveDeep",
    strikethroughColor = "colorInterfaceDarkUp"
)

Verificação

  • ./gradlew :ocean-components:compileDebugKotlin → BUILD SUCCESSFUL.

🤖 Generated with Claude Code

Adds an optional `strikethroughColor` to OceanInlineTextList to control the
color of `value` when it is struck through (i.e. when `newValue` is present).
Until now this color was hardcoded to `interfaceDarkDown` and the public
`color` prop was ignored in that case.

When `strikethroughColor` is null the component keeps using `interfaceDarkDown`,
so the change is fully backward-compatible. Adds a preview demonstrating the
new prop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@FabioRolin FabioRolin force-pushed the feat/inline-text-list-strikethrough-color branch from 70ac973 to 857fedc Compare June 3, 2026 18:14
@FabioRolin FabioRolin self-assigned this Jun 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

@FabioRolin FabioRolin merged commit e430dfd into master Jun 3, 2026
3 checks passed
@FabioRolin FabioRolin deleted the feat/inline-text-list-strikethrough-color branch June 3, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants