refactor(buttons): remove some code duplication