Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Error in useColorModes Function #553

Open
beejuice-fr opened this issue Nov 15, 2024 · 0 comments
Open

Type Error in useColorModes Function #553

beejuice-fr opened this issue Nov 15, 2024 · 0 comments

Comments

@beejuice-fr
Copy link

beejuice-fr commented Nov 15, 2024

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>>
}
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

No branches or pull requests

1 participant