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

Bug - [Modal] - [TypeScript typing is wrong] #10361

Closed
jelly opened this issue May 14, 2024 · 0 comments · Fixed by #10474
Closed

Bug - [Modal] - [TypeScript typing is wrong] #10361

jelly opened this issue May 14, 2024 · 0 comments · Fixed by #10474
Assignees
Labels

Comments

@jelly
Copy link
Contributor

jelly commented May 14, 2024

Describe the problem

Modal

How do you reproduce the problem?

The TypeScript type for a Modal's title is a string while passing a React component, so now that we converted part of our code to TypeScript the type check complains:

<Modal
    title={<>this is some <b>text</b></>}

The title ends up being passed from Modal to ModelContent to ModalBoxTitle which does accept a React.ReactNode.

  /** Content rendered inside the modal box title. */
  title: React.ReactNode;

Expected behavior

No typing error

Is this issue blocking you?

No

What is your product and what release date are you targeting?

Cockpit

Any other information?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants