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

fix(color-modes): (TS) accept SetStateAction and generic parameter #1174

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

hasparus
Copy link
Member

@hasparus hasparus commented Sep 3, 2020

A small fix for the problem I described in #1119 (reply in thread).

@hasparus hasparus added the bug Something isn't working label Sep 3, 2020
@hasparus hasparus requested a review from jxnblk September 3, 2020 08:54
@hasparus
Copy link
Member Author

hasparus commented Nov 2, 2020

Hey @atanasster, could you take a look at this PR?

Copy link
Collaborator

@atanasster atanasster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Maybe setColorMode?: (colorMode: SetStateAction<string>) => void => setColorMode?: (setColorMode: SetStateAction<string>) => void ?

@hasparus
Copy link
Member Author

hasparus commented Nov 5, 2020

Maybe setColorMode?: (colorMode: SetStateAction) => void => setColorMode?: (setColorMode: SetStateAction) => void ?

I know it's just a type declaration, but I'd avoid shadowing either way.

@hasparus hasparus merged commit 2d0f371 into system-ui:master Nov 5, 2020
@hasparus hasparus deleted the generic-use-color-mode branch November 5, 2020 15:05
@hasparus hasparus mentioned this pull request Nov 9, 2020
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants