/** * Returns an object consisting of props beyond the scope of the Component. * Useful for getting and spreading unknown props from the user. * * @param handledProps - An array with names of props * @param props - A ReactElement props object * @returns A shallow copy of the prop object */ export function getUnhandledProps
>(handledProps: (keyof P)[], props: P): Partial
{
return Object.keys(props).reduce