paradiego
This commit is contained in:
28
node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js
generated
vendored
Normal file
28
node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import isHostComponent from "../isHostComponent/index.js";
|
||||
|
||||
/**
|
||||
* Type of the ownerState based on the type of an element it applies to.
|
||||
* This resolves to the provided OwnerState for React components and `undefined` for host components.
|
||||
* Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Appends the ownerState object to the props, merging with the existing one if necessary.
|
||||
*
|
||||
* @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
|
||||
* @param otherProps Props of the element.
|
||||
* @param ownerState
|
||||
*/
|
||||
function appendOwnerState(elementType, otherProps, ownerState) {
|
||||
if (elementType === undefined || isHostComponent(elementType)) {
|
||||
return otherProps;
|
||||
}
|
||||
return {
|
||||
...otherProps,
|
||||
ownerState: {
|
||||
...otherProps.ownerState,
|
||||
...ownerState
|
||||
}
|
||||
};
|
||||
}
|
||||
export default appendOwnerState;
|
||||
1
node_modules/@mui/utils/esm/appendOwnerState/index.js
generated
vendored
Normal file
1
node_modules/@mui/utils/esm/appendOwnerState/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./appendOwnerState.js";
|
||||
Reference in New Issue
Block a user