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: allow ReactNode type for title and caption #1140

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

gausie
Copy link
Contributor

@gausie gausie commented Jan 23, 2023

string is already part of the ReactNode union type, so this change works

`string` is already part of the `ReactNode` union type, so this change works
@browniebroke
Copy link
Owner

Thanks for the fix. Do you think you could write a small test for that? Would be useful to make sure this case isn't missed in the future... You can take example to the existing tests. It doesn't have to be too involved.

@browniebroke
Copy link
Owner

Ok, scratch that suggestion from before. These properties aren't test at the moment, because we don't test the component with the state isOpen = true, which is when they are used. After a quick search, it looks like our current tests are not well setup for testing that.

@browniebroke browniebroke changed the title Title and caption can both be passed React nodes fix: allow ReactNode type for title and caption Jan 26, 2023
@browniebroke browniebroke merged commit f2a35cd into browniebroke:main Jan 26, 2023
@browniebroke
Copy link
Owner

Thanks for the fix 👍🏻

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

Successfully merging this pull request may close these issues.

2 participants