Move common button container logic to abstract class.