Files
2021-10-07 11:39:02 +00:00

23 lines
686 B
Swift

//
// ButtonFactory.swift
// PrivadoVPN
//
// Created by Zhandos Bolatbekov on 03.06.2021.
// Copyright © 2021 Privado LLC. All rights reserved.
//
import UIKit
final class ButtonFactory {
func makePrimary(withText text: String?, height: CGFloat) -> Button {
let button = Button(text: text,
textColor: Colors.basicText.color,
font: UIFont.primary(size: 18, weight: .bold),
backgroundColor: UIColor(rgb: 0x28D799),
cornerRadius: height / 2)
button.heightAnchor.constraint(equalToConstant: height).isActive = true
return button
}
}