Influence of bonding on superconductivity in high-pressure hydrides