I wonder if diabetes is genetic?

I chose this topic because if a couple wanted to have children, and one of the loved ones had diabetes, would they still want to have kids, but have the risk of passing it on.