No, diabetes has both components. It has both genetic and lifestyle components as well. The inheritance changes with the type of diabetes as well.
There is increased susceptibility to type 1 diabetes if inherited, but the disease is not genetically predetermined. The identical twin of a patient with type 1 diabetes has a 30–50% chance of developing the disease and the risk is greater by having a diabetic father (3–7%) than a diabetic mother (2–3%). Also if one child in a family has type 1 diabetes, each sibling has a ? 6% risk of developing diabetes by age 20. This risk is increased if the siblings are belong to similar HLA types.
Similarly in type 2 diabetes the genetic predisposition leading to diabetes is more stronger than type 1 though it is considered as it is due to affluent lifestyles and wrong food habits . Population-based studies show that identical twins of patients with type 2 diabetes have > 50% chance of developing diabetes and the risk of non-identical twins or siblings is 25%.
Type 2 diabetes is a polygenic disorder ( several genes have involved in causing the disease) as with type 1 diabetes. But still not all with genetic predisposition will get diabetes if they maintain a healthy active lifestyle.