Heavy rainfall has caused flooding across South Yorkshire and Derbyshire.