1
0
Fork 0

worked on GarageApp stuff

This commit is contained in:
Techognito 2025-08-25 17:46:11 +02:00
parent 60aaf17af3
commit eb606572b0
51919 changed files with 2168177 additions and 18 deletions

View file

@ -0,0 +1,17 @@
import * as React from 'react';
import { DistributiveOmit, OverridableTypeMap } from '@mui/types';
/**
* A component whose root component can be controlled explicitly with a generic type parameter.
* Adjusts valid props based on the type of `RootComponent`.
*
* @template TypeMap The interface the defines the props and a default root element of the component.
*/
export type PolymorphicComponent<TypeMap extends OverridableTypeMap> = {
<RootComponent extends React.ElementType = TypeMap['defaultComponent']>(props: PolymorphicProps<TypeMap, RootComponent>): React.JSX.Element | null;
propTypes?: any;
displayName?: string | undefined;
};
/**
* Own props of the component augmented with props of the root component.
*/
export type PolymorphicProps<TypeMap extends OverridableTypeMap, RootComponent extends React.ElementType> = TypeMap['props'] & DistributiveOmit<React.ComponentPropsWithRef<RootComponent>, keyof TypeMap['props']>;