Skip to content

[Feature]: Add an property to Card for a built-in disabled state #2202

Description

@soulcramer

Outcome

Card accepts an enabled parameter and handles disabled opacity and click blocking internally.

Problem

Card is a wrapper with no concept of a disabled state; callers must manually apply disabled opacity and suppress interactions, leading to inconsistent implementations across the codebase.

Context

Current behaviour: there is no enabled parameter on Card, so consumers replicate disabled logic themselves.
Source file: spark/src/main/kotlin/com/adevinta/spark/components/card/Card.kt

Scope

  • Add an enabled: Boolean = true parameter to Card.
  • Apply disabled visual (reduced opacity) and block clicks when enabled = false.

Acceptance criteria

  • Setting enabled = false on Card renders it at the disabled opacity and ignores click events.
  • A screenshot test covers the disabled visual state.
  • A UI test confirms clicks are suppressed when disabled.

Evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    LLMMainly built by a LLMcomponentRelated to a componentenhancementNew feature or requestpriority:LOWNice to have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions