Skip to content

Theme Switcher: incoherent toggleMode and getCurrentTheme methods #2292

@edramos-97

Description

@edramos-97

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

The behavior of theme switcher doesn't seem correct, please verify.

I would expect that both the toogleMode and getCurrentTheme methods prioritize looking at the same field (classList vs dataAttribute) OR that toggleMode would change both fields.

The issue happens when programmatically setting the variant after using the setVariant which enables both the classList and dataAttribute

What type of frontend framework are you seeing the problem on?

React

On which version of the frontend framework are you experiencing the issue?

react@19.2.0

Which version of iX do you use?

v4.0.0

Code to produce this issue.

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    BacklogIts part of the team backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions