Refactored Text and Button components to a common superclass