Skip to content

Type Error in useColorModes Function #553

Open
@beejuice-fr

Description

@beejuice-fr

Description:
There is a type mismatch in the useColorModes function. The interface for setColorMode is defined as:

interface UseColorModesOutput {
  colorMode: string | undefined;
  isColorModeSet: () => boolean;
  setColorMode: Dispatch<SetStateAction<string>>;
}

However, the correct type should allow setColorMode to handle both string and undefined values. The interface should be updated as follows:

interface UseColorModesOutput {
  colorMode: string | undefined
  isColorModeSet: () => boolean
  setColorMode: Dispatch<SetStateAction<string | undefined>>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions