Rect and position panel

I’m trying to know if the panel contains the mouse with rect.contains.

            Rect rect = new Rect (panelContenedor.transform.position);
            if (rect.Contains(Input.mousePosition))
            {
           
            }

But it show me this errors

It is assumed that rect.contains takes Vector 3

i got it, the error was not to put the size

Rect rect = new Rect (panelContenedor.GetComponent<RectTransform>().rect.position, panelContenedor.GetComponent<RectTransform>().rect.size);

Although Rect.Contains does not take well the dimensions. Why?