UNPKG

337 BJavaScriptView Raw
1/**
2 * If `componentProps` is a function, calls it with the provided `ownerState`.
3 * Otherwise, just returns `componentProps`.
4 */
5export function resolveComponentProps(componentProps, ownerState, slotState) {
6 if (typeof componentProps === 'function') {
7 return componentProps(ownerState, slotState);
8 }
9 return componentProps;
10}
\No newline at end of file