Updated height and width calculations in Dimensions component