updated button to deal with width for cells

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-12-02 13:29:47 -06:00
parent b67cda26f1
commit 91b0b4415c

View File

@ -143,6 +143,11 @@ open class Button: ButtonBase, Useable {
//--------------------------------------------------
// MARK: - Overrides
//--------------------------------------------------
open override var intrinsicContentSize: CGSize {
guard let width, width > 0 else { return super.intrinsicContentSize }
return CGSize(width: width > size.minimumWidth ? width : size.minimumWidth, height: size.height)
}
open override func updateView() {
super.updateView()
let bgColor = buttonBackgroundColorConfiguration.getColor(self)