Add JSX.IntrinsictAttributes constraint to P in Tabs.

This commit is contained in:
Daniel Rosenwasser 2022-07-19 16:09:49 -07:00 committed by GitHub
parent 558714532c
commit 257966ac9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ export interface TabsProps<P> {
position: Position;
}
export default class Tabs<P> extends Component<TabsProps<P>> {
export default class Tabs<P extends JSX.IntrinsicAttributes> extends Component<TabsProps<P>> {
SelectedComponent?: React.ComponentType<P>;
selector?: () => P;