Semantic-Org / Semantic-UI-React

The official Semantic-UI-React integration
https://react.semantic-ui.com
MIT License
13.19k stars 4.04k forks source link

[v3.0.0-beta.2] Type `Tab.Pane` is missing #4457

Closed hanazuki closed 3 months ago

hanazuki commented 6 months ago

Bug Report

Tab.Pane type is missing in the TypeScript type definition from v3.0.0-beta.2.

It seems the property was mistakenly dropped from Tab.d.ts in this commit: https://github.com/Semantic-Org/Semantic-UI-React/commit/e243fa47ac28b4f67141c73a3a0141afe9317b8a#diff-a4fd743c7d3d12205492c1129d5fc47d15c620f7a76a38a1de0864f18e605092

Steps

Type-check the following code in TypeScript.

import { Tab } from 'semantic-ui-react'
export const App = () => <Tab panes={
  [{
    menuItem: { content: 'tab' },
    render: () => <Tab.Pane>pane</Tab.Pane>
  }]
} />

Expected Result

It's well-typed.

Actual Result

src/Test.tsx:5:24 - error TS2339: Property 'Pane' does not exist on type 'ForwardRefComponent<TabProps, HTMLDivElement>'.

5     render: () => <Tab.Pane>pane</Tab.Pane>
                         ~~~~

src/Test.tsx:5:39 - error TS2339: Property 'Pane' does not exist on type 'ForwardRefComponent<TabProps, HTMLDivElement>'.

5     render: () => <Tab.Pane>pane</Tab.Pane>
                                        ~~~~

Version

3.0.0-beta.2

Testcase

welcome[bot] commented 6 months ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

layershifter commented 6 months ago

Oops. @hanazuki do you want to submit a PR to fix it?