8000 TypeScript: Modal component accepts arbitrary props · Issue #6176 · react-bootstrap/react-bootstrap · GitHub
[go: up one dir, main page]

Skip to content
TypeScript: Modal component accepts arbitrary props #6176
Open
@srmagura

Description

@srmagura

Prerequisites

Describe the bug

This line makes it so you can pass non-existent props to the Modal component and TypeScript will still compile.

Expected behavior

The following code should produce a TypeScript error:

const el = <Modal foobar="123" baz={77} bux={{ grapeJuice: false }} />

To Reproduce

See CodeSandbox.

Reproducible Example

https://codesandbox.io/s/react-bootstrap-modal-types-kgge3

Screenshots

No response

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of React-Bootstrap are you using?

2.1.0

What version of Bootstrap are you using?

N/A

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0